Commit 78c383e5 by Marcus Shawcroft Committed by Tianqi Chen

Docker updates (#2702)

* [DOCKER] Switch from yes|apt-get to apt-get -y

The yes | apt-get idom guarantees that the 'yes' process always exists
with exit code 141 (pipe broken).  This is fine while the script
generally ignores failures but won't work when the script behaviour is
tightened to robustly catch errors.

* [DOCKER] Turn down the wget/curl volume
parent c9a08bed
...@@ -7,7 +7,7 @@ ASDKTOOLS_HOME=/opt/android-sdk-tools ...@@ -7,7 +7,7 @@ ASDKTOOLS_HOME=/opt/android-sdk-tools
ASDKTOOLS_VERSION=3859397 ASDKTOOLS_VERSION=3859397
ASDKTOOLS_SHA256=444e22ce8ca0f67353bda4b85175ed3731cae3ffa695ca18119cbacef1c1bea0 ASDKTOOLS_SHA256=444e22ce8ca0f67353bda4b85175ed3731cae3ffa695ca18119cbacef1c1bea0
wget http://dl.google.com/android/repository/sdk-tools-linux-${ASDKTOOLS_VERSION}.zip -O sdk-tools-linux.zip wget -q http://dl.google.com/android/repository/sdk-tools-linux-${ASDKTOOLS_VERSION}.zip -O sdk-tools-linux.zip
echo "${ASDKTOOLS_SHA256} *sdk-tools-linux.zip" | sha256sum --check - echo "${ASDKTOOLS_SHA256} *sdk-tools-linux.zip" | sha256sum --check -
unzip sdk-tools-linux.zip unzip sdk-tools-linux.zip
rm sdk-tools-linux.zip rm sdk-tools-linux.zip
......
cd /usr/local/lib cd /usr/local/lib
wget https://www.antlr.org/download/antlr-4.7.1-complete.jar wget -q https://www.antlr.org/download/antlr-4.7.1-complete.jar
cd - cd -
#install the necessary dependancies, cffi, opencv #install the necessary dependancies, cffi, opencv
wget 'https://github.com/siju-samuel/darknet/blob/master/lib/libdarknet.so?raw=true' -O libdarknet.so wget -q 'https://github.com/siju-samuel/darknet/blob/master/lib/libdarknet.so?raw=true' -O libdarknet.so
pip2 install opencv-python cffi pip2 install opencv-python cffi
pip3 install opencv-python cffi pip3 install opencv-python cffi
alias make="make -j4" alias make="make -j4"
# Get latest cmake # Get latest cmake
wget https://cmake.org/files/v3.8/cmake-3.8.2-Linux-x86_64.tar.gz wget -q https://cmake.org/files/v3.8/cmake-3.8.2-Linux-x86_64.tar.gz
tar xf cmake-3.8.2-Linux-x86_64.tar.gz tar xf cmake-3.8.2-Linux-x86_64.tar.gz
export PATH=/cmake-3.8.2-Linux-x86_64/bin/:${PATH} export PATH=/cmake-3.8.2-Linux-x86_64/bin/:${PATH}
wget https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz wget -q https://s3.amazonaws.com/mozilla-games/emscripten/releases/emsdk-portable.tar.gz
tar xf emsdk-portable.tar.gz tar xf emsdk-portable.tar.gz
cd emsdk-portable cd emsdk-portable
./emsdk update ./emsdk update
......
...@@ -7,7 +7,7 @@ GRADLE_VERSION=4.10-rc-2 ...@@ -7,7 +7,7 @@ GRADLE_VERSION=4.10-rc-2
GRADLE_SHA256=e90d3c32910e259814bcca82b3911172ecca1ff1ab5ed69b4de3c1df8b378b40 GRADLE_SHA256=e90d3c32910e259814bcca82b3911172ecca1ff1ab5ed69b4de3c1df8b378b40
echo "Downloading Gradle" echo "Downloading Gradle"
wget --output-document=gradle.zip "https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip" wget -q --output-document=gradle.zip "https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip"
echo "Checking Gradle hash" echo "Checking Gradle hash"
echo "${GRADLE_SHA256} *gradle.zip" | sha256sum --check - echo "${GRADLE_SHA256} *gradle.zip" | sha256sum --check -
echo "Installing Gradle" echo "Installing Gradle"
......
apt-get install -y --no-install-recommends --force-yes make bison flex apt-get install -y --no-install-recommends --force-yes make bison flex
wget ftp://icarus.com/pub/eda/verilog/v10/verilog-10.1.tar.gz wget -q ftp://icarus.com/pub/eda/verilog/v10/verilog-10.1.tar.gz
tar xf verilog-10.1.tar.gz tar xf verilog-10.1.tar.gz
cd verilog-10.1 cd verilog-10.1
./configure --prefix=/usr ./configure --prefix=/usr
......
...@@ -18,5 +18,5 @@ echo deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial main\ ...@@ -18,5 +18,5 @@ echo deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial main\
echo deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial main\ echo deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial main\
>> /etc/apt/sources.list.d/llvm.list >> /etc/apt/sources.list.d/llvm.list
wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - wget -q -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
apt-get update && apt-get install -y --force-yes llvm-4.0 llvm-5.0 llvm-6.0 clang-6.0 apt-get update && apt-get install -y --force-yes llvm-4.0 llvm-5.0 llvm-6.0 clang-6.0
apt-get update && apt-get install -y curl apt-get update && apt-get install -y curl
curl -sL https://deb.nodesource.com/setup_6.x | bash - curl -s -S -L https://deb.nodesource.com/setup_6.x | bash -
apt-get update && apt-get install -y nodejs apt-get update && apt-get install -y nodejs
npm install eslint jsdoc ws npm install eslint jsdoc ws
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
apt-get update && apt-get install -y python-dev apt-get update && apt-get install -y python-dev
# python 3.6 # python 3.6
apt-get update && yes | apt-get install software-properties-common apt-get update && apt-get install -y software-properties-common
add-apt-repository ppa:jonathonf/python-3.6 &&\ add-apt-repository ppa:jonathonf/python-3.6 &&\
apt-get update && apt-get install -y python-pip python-dev python3.6 python3.6-dev apt-get update && apt-get install -y python-pip python-dev python3.6 python3.6-dev
rm -f /usr/bin/python3 && ln -s /usr/bin/python3.6 /usr/bin/python3 rm -f /usr/bin/python3 && ln -s /usr/bin/python3.6 /usr/bin/python3
# Install pip # Install pip
cd /tmp && wget https://bootstrap.pypa.io/get-pip.py && python2 get-pip.py && python3.6 get-pip.py cd /tmp && wget -q https://bootstrap.pypa.io/get-pip.py && python2 get-pip.py && python3.6 get-pip.py
...@@ -3,7 +3,7 @@ apt-get update && apt-get install -y --no-install-recommends --force-yes curl ...@@ -3,7 +3,7 @@ apt-get update && apt-get install -y --no-install-recommends --force-yes curl
export RUSTUP_HOME=/opt/rust export RUSTUP_HOME=/opt/rust
export CARGO_HOME=/opt/rust export CARGO_HOME=/opt/rust
# this rustc is one supported by the installed version of rust-sgx-sdk # this rustc is one supported by the installed version of rust-sgx-sdk
curl https://sh.rustup.rs -sSf | sh -s -- -y --no-modify-path --default-toolchain nightly-2019-01-28 curl -s -S https://sh.rustup.rs -sSf | sh -s -- -y --no-modify-path --default-toolchain nightly-2019-01-28
. $CARGO_HOME/env . $CARGO_HOME/env
rustup toolchain add nightly rustup toolchain add nightly
rustup component add rust-src rustup component add rust-src
......
...@@ -8,7 +8,7 @@ apt-get update && apt-get install -y --no-install-recommends --force-yes \ ...@@ -8,7 +8,7 @@ apt-get update && apt-get install -y --no-install-recommends --force-yes \
git clone https://github.com/intel/linux-sgx.git git clone https://github.com/intel/linux-sgx.git
cd linux-sgx cd linux-sgx
git checkout sgx_2.2 git checkout sgx_2.2
curl 'https://gist.githubusercontent.com/nhynes/c770b0e91610f8c020a8d1a803a1e7cb/raw/8f5372d9cb88929b3cc49a384943bb363bc06827/intel-sgx.patch' | git apply curl -s -S 'https://gist.githubusercontent.com/nhynes/c770b0e91610f8c020a8d1a803a1e7cb/raw/8f5372d9cb88929b3cc49a384943bb363bc06827/intel-sgx.patch' | git apply
./download_prebuilt.sh ./download_prebuilt.sh
make -j4 sdk && make -j4 sdk_install_pkg make -j4 sdk && make -j4 sdk_install_pkg
./linux/installer/bin/sgx_linux_x64_sdk*.bin --prefix /opt ./linux/installer/bin/sgx_linux_x64_sdk*.bin --prefix /opt
...@@ -17,5 +17,5 @@ cd - ...@@ -17,5 +17,5 @@ cd -
git clone https://github.com/baidu/rust-sgx-sdk.git /opt/rust-sgx-sdk git clone https://github.com/baidu/rust-sgx-sdk.git /opt/rust-sgx-sdk
cd /opt/rust-sgx-sdk cd /opt/rust-sgx-sdk
git checkout 6098af # v1.0.5 git checkout 6098af # v1.0.5
curl 'https://gist.githubusercontent.com/nhynes/37164039c5d3f33aa4f123e4ba720036/raw/b0de575fe937231799930764e76c664b92975163/rust-sgx-sdk.diff' | git apply curl -s -S 'https://gist.githubusercontent.com/nhynes/37164039c5d3f33aa4f123e4ba720036/raw/b0de575fe937231799930764e76c664b92975163/rust-sgx-sdk.diff' | git apply
cd - cd -
...@@ -13,7 +13,7 @@ pip2 install flatbuffers ...@@ -13,7 +13,7 @@ pip2 install flatbuffers
# Setup tflite from schema # Setup tflite from schema
mkdir tflite mkdir tflite
cd tflite cd tflite
wget https://raw.githubusercontent.com/tensorflow/tensorflow/r1.12/tensorflow/contrib/lite/schema/schema.fbs wget -q https://raw.githubusercontent.com/tensorflow/tensorflow/r1.12/tensorflow/contrib/lite/schema/schema.fbs
flatc --python schema.fbs flatc --python schema.fbs
cat <<EOM >setup.py cat <<EOM >setup.py
......
#/bin/bash #/bin/bash
wget https://sdk.lunarg.com/sdk/download/1.0.65.0/linux/vulkansdk-linux-x86_64-1.0.65.0.run wget -q https://sdk.lunarg.com/sdk/download/1.0.65.0/linux/vulkansdk-linux-x86_64-1.0.65.0.run
bash vulkansdk-linux-x86_64-1.0.65.0.run bash vulkansdk-linux-x86_64-1.0.65.0.run
mv VulkanSDK /usr/local/VulkanSDK mv VulkanSDK /usr/local/VulkanSDK
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment