1# To push a new version, run: 2# $ docker build -f Dockerfile.rbe.cuda10.0-cudnn7-ubuntu14.04 \ 3# --tag "gcr.io/tensorflow-testing/nosla-cuda10.0-cudnn7-ubuntu14.04" . 4# $ docker push gcr.io/tensorflow-testing/nosla-cuda10.0-cudnn7-ubuntu14.04 5 6FROM gcr.io/clang-docker-builder/clang-ubuntu14_04 7LABEL maintainer="Manuel Klimek <klimek@google.com>" 8 9RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates apt-transport-https gnupg-curl && \ 10 rm -rf /var/lib/apt/lists/* && \ 11 NVIDIA_GPGKEY_SUM=d1be581509378368edeec8c1eb2958702feedf3bc3d17011adbf24efacce4ab5 && \ 12 NVIDIA_GPGKEY_FPR=ae09fe4bbd223a84b2ccfce3f60f4b3d7fa2af80 && \ 13 apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub && \ 14 apt-key adv --export --no-emit-version -a $NVIDIA_GPGKEY_FPR | tail -n +2 > cudasign.pub && \ 15 echo "$NVIDIA_GPGKEY_SUM cudasign.pub" | sha256sum -c --strict - && rm cudasign.pub && \ 16 echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/cuda.list && \ 17 echo "deb https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/nvidia-ml.list 18 19ENV CUDA_VERSION 10.0.130 20ENV CUDA_PKG_VERSION 10-0=$CUDA_VERSION-1 21ENV CUDNN_VERSION 7.3.1.20 22ENV TENSORRT_VERSION 5.0.2 23ENV NVIDIA_DRIVER_CAPABILITIES compute,utility 24ENV NVIDIA_REQUIRE_CUDA "cuda>=10.0,driver>=410" 25ENV NVIDIA_VISIBLE_DEVICES all 26ENV PATH /usr/local/cuda/bin:${PATH} 27 28# TODO(b/110903506): /usr/loca/cuda/lib64/stubs should not be needed in 29# LD_LIBRARY_PATH. The stubs/libcuda.so is not meant to used at runtime. The 30# correct way to pass the path to bfd-ld is to pass 31# -Wl,-rpath-link=/usr/local/cuda/lib64/stubs to all binaries transitively 32# depending on libcuda. Optimally, builds targeting cuda would do that 33# internally. 34ENV LD_LIBRARY_PATH /usr/local/cuda/lib64/stubs 35 36LABEL com.nvidia.cudnn.version="${CUDNN_VERSION}" 37 38RUN apt-get update && apt-get install -y --no-install-recommends \ 39 cuda-command-line-tools-$CUDA_PKG_VERSION \ 40 cuda-compat-10-0=410.48-1 \ 41 cuda-cudart-$CUDA_PKG_VERSION \ 42 cuda-libraries-$CUDA_PKG_VERSION \ 43 cuda-libraries-dev-$CUDA_PKG_VERSION \ 44 cuda-minimal-build-$CUDA_PKG_VERSION \ 45 cuda-nvml-dev-$CUDA_PKG_VERSION \ 46 cuda-nvtx-$CUDA_PKG_VERSION \ 47 libcudnn7=$CUDNN_VERSION-1+cuda10.0 \ 48 libcudnn7=$CUDNN_VERSION-1+cuda10.0 \ 49 libcudnn7-dev=$CUDNN_VERSION-1+cuda10.0 \ 50 nvinfer-runtime-trt-repo-ubuntu1604-$TENSORRT_VERSION-ga-cuda10.0 && \ 51 apt-get update && apt-get install -y --no-install-recommends \ 52 libnvinfer5=$TENSORRT_VERSION-1+cuda10.0 \ 53 libnvinfer-dev=$TENSORRT_VERSION-1+cuda10.0 && \ 54 ln -s cuda-10.0 /usr/local/cuda && \ 55 apt-mark hold libcudnn7 && \ 56 rm -rf /var/lib/apt/lists/* 57 58# TODO(b/110903506): Provide a link to the SONAME of libcuda.so. 59# https://github.com/NVIDIA/nvidia-docker/issues/775 60RUN ln -s libcuda.so /usr/local/cuda/lib64/stubs/libcuda.so.1 61 62# Install a newer version of g++: 63# - we need a new libstdc++, because new clang versions do not work with a stock 64# ubuntu 14.04 libstdc++. 65# - we want to compile with g++-7 to get ahead of LLVM dropping support for 66# gcc 4.8. 67RUN apt-get update && \ 68 apt-get install -y software-properties-common && \ 69 add-apt-repository ppa:ubuntu-toolchain-r/test -y && \ 70 apt-get update && \ 71 apt-get install -y --no-install-recommends g++-7 && \ 72 rm -rf /var/lib/apt/lists/* 73 74# Copy and run the install scripts. 75COPY install/*.sh /install/ 76ARG DEBIAN_FRONTEND=noninteractive 77RUN /install/install_bootstrap_deb_packages.sh 78RUN add-apt-repository -y ppa:openjdk-r/ppa && \ 79 add-apt-repository -y ppa:george-edison55/cmake-3.x 80RUN /install/install_deb_packages.sh 81RUN /install/install_pip_packages.sh 82RUN /install/install_golang.sh 83 84