Skip to content

Commit

Permalink
🛠 fix cuda 11 installation (#51)
Browse files Browse the repository at this point in the history
* version number bug
  • Loading branch information
haobibo authored Jul 11, 2020
1 parent bc9921f commit 0b5e974
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ stages:
- qpod

jobs:
allow_failures:
- name: "base-cuda_10.2"
- name: "base-cuda_11.0"

include:
- name: "base"
stage: base
Expand Down
25 changes: 12 additions & 13 deletions docker_base/cuda11.0.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ ARG ARG_CUDA_DEVEL=true
ARG ARG_CUDNN_DEVEL=true

ENV CUDA_VER 11.0
ENV CUDA_VERSION ${CUDA_VER}.171
ENV CUDA_VERSION ${CUDA_VER}.194
ENV CUDA_PKG_VERSION 11-0=$CUDA_VERSION-1
ENV NCCL_VERSION 2.7.3
ENV CUDNN_VERSION 8.0.0.180
ENV CUBLAS_VERSION 11.0.0.191-1
ENV CUBLAS_VERSION 11.1.0.229-1

ENV NVIDIA_VISIBLE_DEVICES=all \
NVIDIA_DRIVER_CAPABILITIES=compute,utility \
Expand All @@ -46,36 +46,35 @@ RUN wget -qO- "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1
# If installing CUDA runtime
RUN ${ARG_CUDA_RUNTIME:-false} \
&& apt-get install -y --no-install-recommends \
cuda-libraries-11-0=11.0.1-1 libnpp-11-0=11.0.0.191-1 cuda-nvtx-11-0=11.0.167-1 \
&& wget -nv https://developer.download.nvidia.com/compute/redist/nccl/v2.7/nccl_2.7.3-1+cuda11.0_x86_64.txz -O /tmp/nccl1.txz \
cuda-libraries-11-0=11.0.2-1 libnpp-11-0=11.0.0.218-1 cuda-nvtx-11-0=11.0.167-1 \
&& wget -nv https://developer.download.nvidia.com/compute/redist/nccl/v2.7/nccl_${NCCL_VERSION}-1+cuda11.0_x86_64.txz -O /tmp/nccl1.txz \
&& tar --no-same-owner --keep-old-files --lzma -xvf /tmp/nccl1.txz -C /usr/local/cuda/lib64/ --strip-components=2 --wildcards '*/lib/libnccl.so.*' \
&& tar --no-same-owner --keep-old-files --lzma -xvf /tmp/nccl1.txz -C /usr/lib/pkgconfig/ --strip-components=3 --wildcards '*/lib/pkgconfig/*' \
&& ldconfig \
|| true

# If installing CUDNN runtime
RUN ${ARG_CUDNN_RUNTIME:false} \
&& wget -nv https://developer.download.nvidia.com/compute/redist/cudnn/v8.0.0/Ubuntu18_04-x64/libcudnn8_8.0.0.180-1+cuda11.0_amd64.deb -O /tmp/cudnn1.deb \
&& wget -nv "https://developer.download.nvidia.com/compute/redist/cudnn/v8.0.0/Ubuntu18_04-x64/libcudnn8_${CUDNN_VERSION}-1+cuda11.0_amd64.deb" -O /tmp/cudnn1.deb \
&& dpkg -i /tmp/cudnn1.deb \
|| true

# If installing CUDA devel
RUN ${ARG_CUDA_DEVEL:false} \
&& apt-get install -y --no-install-recommends \
cuda-nvml-dev-11-0=11.0.167-1 cuda-command-line-tools-11-0=11.0.1-1 \
cuda-nvcc-11-0=11.0.167-1 cuda-nvprof-11-0=11.0.167-1 \
libnpp-dev-11-0=11.0.0.191-1 cuda-libraries-dev-11-0=11.0.1-1 \
cuda-minimal-build-11-0=11.0.1-1 libcublas-dev-11-0=11.0.0.191-1 \
libcusparse-11-0=11.0.0.191-1 libcusparse-dev-11-0=11.0.0.191-1 \
&& wget -nv https://developer.download.nvidia.com/compute/redist/nccl/v2.7/nccl_2.7.3-1+cuda11.0_x86_64.txz -O /tmp/nccl2.txz \
cuda-minimal-build-11-0=11.0.2-1 cuda-libraries-dev-11-0=11.0.2-1 cuda-command-line-tools-11-0=11.0.2-1 \
cuda-nvml-dev-11-0=11.0.167-1 libcublas-dev-11-0=${CUBLAS_VERSION} \
cuda-nvcc-11-0=11.0.194-1 cuda-nvprof-11-0=11.0.194-1 \
libnpp-dev-11-0=11.1.0.218-1 libcusparse-11-0=11.1.0.218-1 libcusparse-dev-11-0=11.1.0.218-1 \
&& wget -nv https://developer.download.nvidia.com/compute/redist/nccl/v2.7/nccl_${NCCL_VERSION}-1+cuda11.0_x86_64.txz -O /tmp/nccl2.txz \
&& tar --no-same-owner --keep-old-files --lzma -xvf /tmp/nccl2.txz -C /usr/local/cuda/include/ --strip-components=2 --wildcards '*/include/*' \
&& tar --no-same-owner --keep-old-files --lzma -xvf /tmp/nccl2.txz -C /usr/local/cuda/lib64/ --strip-components=2 --wildcards '*/lib/libnccl.so' \
|| true

# If installing CUDNN devel
RUN ${ARG_CUDNN_DEVEL:false} \
&& wget -nv https://developer.download.nvidia.com/compute/redist/cudnn/v8.0.0/Ubuntu18_04-x64/libcudnn8_8.0.0.180-1+cuda11.0_amd64.deb -O /tmp/cudnn2.deb \
&& wget -nv https://developer.download.nvidia.com/compute/redist/cudnn/v8.0.0/Ubuntu18_04-x64/libcudnn8-dev_8.0.0.180-1+cuda11.0_amd64.deb -O /tmp/cudnn-dev.deb \
&& wget -nv "https://developer.download.nvidia.com/compute/redist/cudnn/v8.0.0/Ubuntu18_04-x64/libcudnn8_${CUDNN_VERSION}-1+cuda11.0_amd64.deb" -O /tmp/cudnn2.deb \
&& wget -nv "https://developer.download.nvidia.com/compute/redist/cudnn/v8.0.0/Ubuntu18_04-x64/libcudnn8-dev_${CUDNN_VERSION}-1+cuda11.0_amd64.deb" -O /tmp/cudnn-dev.deb \
&& dpkg -i /tmp/cudnn2.deb && dpkg -i /tmp/cudnn-dev.deb \
|| true

Expand Down

0 comments on commit 0b5e974

Please sign in to comment.