From 38fbc0873b3036ad44a3843aab5030b74360b81a Mon Sep 17 00:00:00 2001 From: tqchen Date: Tue, 21 Jan 2020 13:45:13 -0800 Subject: [PATCH] [CI][DOCKER] Update ci-gpu torch1.4 and onnx1.6 --- docker/Dockerfile.ci_gpu | 4 +--- docker/bash.sh | 1 - docker/build.sh | 11 +++++++++-- docker/install/ubuntu_install_onnx.sh | 4 ++-- docker/install/ubuntu_install_python.sh | 7 +++++-- docker/install/ubuntu_install_python_package.sh | 2 +- docker/install/ubuntu_install_sphinx.sh | 6 +++--- 7 files changed, 21 insertions(+), 14 deletions(-) diff --git a/docker/Dockerfile.ci_gpu b/docker/Dockerfile.ci_gpu index 7a65a70061b7..162549650994 100644 --- a/docker/Dockerfile.ci_gpu +++ b/docker/Dockerfile.ci_gpu @@ -16,7 +16,7 @@ # under the License. # CI docker GPU env -# tag: v0.56 +# tag: v0.60 FROM nvidia/cuda:10.0-cudnn7-devel-ubuntu16.04 # Base scripts @@ -87,8 +87,6 @@ RUN bash /install/ubuntu_install_caffe2.sh COPY install/ubuntu_install_dgl.sh /install/ubuntu_install_dgl.sh RUN bash /install/ubuntu_install_dgl.sh -RUN pip3 install "Pillow<7" - COPY install/ubuntu_install_vulkan.sh /install/ubuntu_install_vulkan.sh RUN bash /install/ubuntu_install_vulkan.sh diff --git a/docker/bash.sh b/docker/bash.sh index 53bf03d936ac..61823f9b6700 100755 --- a/docker/bash.sh +++ b/docker/bash.sh @@ -94,4 +94,3 @@ ${DOCKER_BINARY} run --rm --pid=host\ ${DOCKER_IMAGE_NAME}\ bash --login /docker/with_the_same_user \ ${COMMAND[@]} - diff --git a/docker/build.sh b/docker/build.sh index 380ae8cb29df..a2e21d140f6f 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -79,8 +79,14 @@ if [ "$#" -lt 1 ] || [ ! -e "${SCRIPT_DIR}/Dockerfile.${CONTAINER_TYPE}" ]; then fi # Use nvidia-docker if the container is GPU. -if [[ "${CONTAINER_TYPE}" == *"gpu"* ]]; then - DOCKER_BINARY="nvidia-docker" +if [[ "${DOCKER_IMAGE_NAME}" == *"gpu"* ]]; then + if ! type "nvidia-docker" 1> /dev/null 2> /dev/null + then + DOCKER_BINARY="docker" + CUDA_ENV=" --gpus all "${CUDA_ENV} + else + DOCKER_BINARY="nvidia-docker" + fi else DOCKER_BINARY="docker" fi @@ -143,6 +149,7 @@ ${DOCKER_BINARY} run --rm --pid=host \ -e "CI_BUILD_UID=$(id -u)" \ -e "CI_BUILD_GROUP=$(id -g -n)" \ -e "CI_BUILD_GID=$(id -g)" \ + ${CUDA_ENV}\ ${CI_DOCKER_EXTRA_PARAMS[@]} \ ${DOCKER_IMG_NAME} \ bash --login docker/with_the_same_user \ diff --git a/docker/install/ubuntu_install_onnx.sh b/docker/install/ubuntu_install_onnx.sh index a915ca02c05a..2ad601983fa2 100755 --- a/docker/install/ubuntu_install_onnx.sh +++ b/docker/install/ubuntu_install_onnx.sh @@ -21,11 +21,11 @@ set -u set -o pipefail # fix to certain version for now -pip3 install onnx==1.5.0 +pip3 install onnx==1.6.0 pip3 install onnxruntime==1.0.0 # torch depends on a number of other packages, but unhelpfully, does # not expose that in the wheel!!! pip3 install future -pip3 install torch==1.2.0 torchvision==0.4.0 +pip3 install torch==1.4.0 torchvision==0.5.0 diff --git a/docker/install/ubuntu_install_python.sh b/docker/install/ubuntu_install_python.sh index 436a3189dd48..c1f9d5081f57 100755 --- a/docker/install/ubuntu_install_python.sh +++ b/docker/install/ubuntu_install_python.sh @@ -6,9 +6,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -35,3 +35,6 @@ rm -f /usr/bin/python3 && ln -s /usr/bin/python3.6 /usr/bin/python3 # Install pip cd /tmp && wget -q https://bootstrap.pypa.io/get-pip.py && python2 get-pip.py && python3.6 get-pip.py + +# Pin pip version +pip3 install pip==19.3.1 diff --git a/docker/install/ubuntu_install_python_package.sh b/docker/install/ubuntu_install_python_package.sh index 32fa0b2251a0..2eaf00e8fdd0 100755 --- a/docker/install/ubuntu_install_python_package.sh +++ b/docker/install/ubuntu_install_python_package.sh @@ -21,4 +21,4 @@ set -u set -o pipefail # install libraries for python package on ubuntu -pip3 install pylint==1.9.4 six numpy pytest cython decorator scipy tornado typed_ast pytest mypy orderedset antlr4-python3-runtime attrs requests "Pillow<7" packaging +pip3 install pylint==1.9.4 six numpy pytest cython decorator scipy tornado typed_ast pytest mypy orderedset antlr4-python3-runtime attrs requests Pillow packaging diff --git a/docker/install/ubuntu_install_sphinx.sh b/docker/install/ubuntu_install_sphinx.sh index bc9caa044f6e..bbc60d90e598 100755 --- a/docker/install/ubuntu_install_sphinx.sh +++ b/docker/install/ubuntu_install_sphinx.sh @@ -6,9 +6,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -20,4 +20,4 @@ set -e set -u set -o pipefail -pip3 install sphinx sphinx-gallery sphinx_rtd_theme sphinx_autodoc_annotation matplotlib Image commonmark>=0.7.3 docutils>=0.11 +pip3 install sphinx sphinx-gallery==0.4.0 sphinx_rtd_theme sphinx_autodoc_annotation matplotlib Image commonmark>=0.7.3 docutils>=0.11