From 946ec0dcfad359383b25a2dcc89437e8d1c097db Mon Sep 17 00:00:00 2001 From: Konstantin Taletskiy Date: Fri, 7 Sep 2018 19:47:25 -0500 Subject: [PATCH] Updated with support of CUDA 9.2 --- Dockerfile | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index eb6d60d..39a6a91 100755 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ nano gnuplot \ g++-5 gcc-5 \ libglib2.0-0 libxext6 libsm6 libxrender1 \ - mercurial subversion && \ + mercurial subversion \ + epstool && \ curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1710/x86_64/7fa2af80.pub | apt-key add - && \ echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1710/x86_64 /" > /etc/apt/sources.list.d/cuda.list && \ echo "deb https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/nvidia-ml.list && \ @@ -15,12 +16,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ rm -rf /var/lib/apt/lists/* -ENV CUDA_VERSION 9.2.88 +ENV CUDA_VERSION 9.2.148 ENV CUDA_PKG_VERSION 9-2=$CUDA_VERSION-1 -ENV NCCL_VERSION 2.2.12 +ENV NCCL_VERSION 2.2.13 RUN apt-get update && apt-get install -y --no-install-recommends \ cuda-cudart-$CUDA_PKG_VERSION \ + cuda-cudart-dev-$CUDA_PKG_VERSION \ + cuda-cupti-$CUDA_PKG_VERSION \ cuda-libraries-$CUDA_PKG_VERSION \ cuda-nvtx-$CUDA_PKG_VERSION \ libnccl2=$NCCL_VERSION-1+cuda9.2 \ @@ -32,13 +35,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ ln -s cuda-9.2 /usr/local/cuda && \ rm -rf /var/lib/apt/lists/* -# nvidia-docker 1.0 -LABEL com.nvidia.volumes.needed="nvidia_driver" -LABEL com.nvidia.cuda.version="${CUDA_VERSION}" - RUN echo "/usr/local/nvidia/lib" >> /etc/ld.so.conf.d/nvidia.conf && \ echo "/usr/local/nvidia/lib64" >> /etc/ld.so.conf.d/nvidia.conf +#Install CUDA path variables ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH} ENV LIBRARY_PATH /usr/local/cuda/lib64/stubs ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64 @@ -46,10 +46,10 @@ ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64 # nvidia-container-runtime ENV NVIDIA_VISIBLE_DEVICES all ENV NVIDIA_DRIVER_CAPABILITIES compute,utility -ENV NVIDIA_REQUIRE_CUDA "cuda>=9.1" +ENV NVIDIA_REQUIRE_CUDA "cuda>=9.2" #Install CuDNN (using this hack since CuDNN does not support 17.04) -ENV CUDNN_VERSION 7.1.4.18 +ENV CUDNN_VERSION 7.2.1.38 LABEL com.nvidia.cudnn.version="${CUDNN_VERSION}" RUN apt-get update && apt-get install -y --no-install-recommends \ @@ -57,14 +57,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libcudnn7-dev=$CUDNN_VERSION-1+cuda9.2 && \ rm -rf /var/lib/apt/lists/* -#Install CUDA path variables -RUN echo "/usr/local/cuda/lib64" >> /etc/ld.so.conf.d/cuda.conf && \ - ldconfig -RUN echo "/usr/local/nvidia/lib" >> /etc/ld.so.conf.d/nvidia.conf && \ - echo "/usr/local/nvidia/lib64" >> /etc/ld.so.conf.d/nvidia.conf -ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH} -ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64 - #Install Anaconda RUN echo 'export PATH=/opt/conda/bin:$PATH' > /etc/profile.d/conda.sh && \ wget --quiet https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O ~/anaconda.sh && \ @@ -76,8 +68,6 @@ RUN /opt/conda/bin/conda install -y ipykernel matplotlib pydot-ng theano pygpu b RUN /opt/conda/bin/conda create -n xeus python=3.6 ipykernel xeus-cling -c QuantStack -c conda-forge RUN /opt/conda/bin/conda create -n pytorch python=3.6 ipykernel pytorch torchvision cuda90 -c pytorch -#RUN /opt/conda/bin/conda install -c calex sklearn-pandas - ENV PATH /opt/conda/bin:${PATH} ENV PATH /usr/local/cuda/bin:${PATH} RUN echo 'export PATH=/usr/local/cuda/bin${PATH:+:${PATH}}' >> /cocalc/src/smc_pyutil/smc_pyutil/templates/linux/bashrc && \