diff options
author | Paul Jesse Hellemn <jesse.hellemn@gmail.com> | 2018-02-20 10:20:07 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-20 10:20:07 -0800 |
commit | ee71eab4c6f99c179b397815b3927531d5f9189a (patch) | |
tree | 72195634e0f59e135cf5f657205d76715c89604e /docker | |
parent | f4f5bad901996051da1711e94ab27f92be084bd2 (diff) | |
download | pytorch-ee71eab4c6f99c179b397815b3927531d5f9189a.tar.gz pytorch-ee71eab4c6f99c179b397815b3927531d5f9189a.tar.bz2 pytorch-ee71eab4c6f99c179b397815b3927531d5f9189a.zip |
Adding 'full' version of conda build (#1934)
Adds another package to Anaconda.org with a "-full" suffix which includes more libraries by default. This also installs NCCL 2.1 onto the CI Ubuntu docker images to accomplish this.
Diffstat (limited to 'docker')
-rwxr-xr-x | docker/jenkins/common/install_nccl.sh | 37 | ||||
-rw-r--r-- | docker/jenkins/ubuntu-cuda/Dockerfile | 6 |
2 files changed, 43 insertions, 0 deletions
diff --git a/docker/jenkins/common/install_nccl.sh b/docker/jenkins/common/install_nccl.sh new file mode 100755 index 0000000000..0cb5214482 --- /dev/null +++ b/docker/jenkins/common/install_nccl.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +set -ex + +[ -n "$UBUNTU_VERSION" ] +[ -n "$CUDA_VERSION" ] + +# This doesn't actually use any NCCL version yet, it's just hardcoded to +# 2.1 for now + +# There are only NCCL packages for Ubuntu 16.04 and 14.04 +if [[ "$UBUNTU_VERSION" == 16.04 ]]; then + NCCL_UBUNTU_VER=ubuntu1604 + NCCL_DEB='nvidia-machine-learning-repo-ubuntu1604_1.0.0-1_amd64.deb' +elif [[ "$UBUNTU_VERSION" == 14.04 ]]; then + NCCL_UBUNTU_VER=ubuntu1404 + NCCL_DEB='nvidia-machine-learning-repo-ubuntu1404_4.0-2_amd64.deb' +else + echo "There is no NCCL package for Ubuntu version ${UBUNTU_VERSION}." + echo " NCCL will not be installed." +fi + +if [ -n "$NCCL_UBUNTU_VER" ]; then + + # The deb is agnostic of CUDA version + curl -LO "http://developer.download.nvidia.com/compute/machine-learning/repos/${NCCL_UBUNTU_VER}/x86_64/${NCCL_DEB}" + + # This dpkg call needs wget + apt-get update + apt-get install -y wget + dpkg -i "${NCCL_DEB}" + + # Actually installing takes into account CUDA version + NCCL_LIB_VERSION="2.1.4-1+cuda${CUDA_VERSION:0:3}" + apt update + apt install libnccl2=$NCCL_LIB_VERSION libnccl-dev=$NCCL_LIB_VERSION +fi diff --git a/docker/jenkins/ubuntu-cuda/Dockerfile b/docker/jenkins/ubuntu-cuda/Dockerfile index db3767593b..f3e59e1b8e 100644 --- a/docker/jenkins/ubuntu-cuda/Dockerfile +++ b/docker/jenkins/ubuntu-cuda/Dockerfile @@ -13,6 +13,12 @@ RUN bash ./install_base.sh && rm install_base.sh ADD ./install_ccache.sh install_ccache.sh RUN bash ./install_ccache.sh && rm install_ccache.sh +# Install NCCL for all CUDA builds +ARG UBUNTU_VERSION +ARG CUDA_VERSION +ADD ./install_nccl.sh install_nccl.sh +RUN bash ./install_nccl.sh && rm install_nccl.sh + # Install Python ARG PYTHON_VERSION ADD ./install_python.sh install_python.sh |