MJay
Ubuntu-1604 with CUDA & CuDNN Dockerfile 본문
요즘 Docker 공부를 많이 하고있다. Ubuntu-16.04 + CUDA + cuDNN 을 설치해주는 Dockerfile을 여러 시도 후에 완성시켰다.
https://hub.docker.com/u/kmubigdata/dashboard/
FROM kmubigdata/ubuntu-1604
RUN NVIDIA_GPGKEY_SUM=d1be581509378368edeec8c1eb2958702feedf3bc3d17011adbf24efacce4ab5 && \
NVIDIA_GPGKEY_FPR=ae09fe4bbd223a84b2ccfce3f60f4b3d7fa2af80 && \
apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub && \
apt-key adv --export --no-emit-version -a $NVIDIA_GPGKEY_FPR | tail -n +5 > cudasign.pub && \
echo "$NVIDIA_GPGKEY_SUM cudasign.pub" | sha256sum -c --strict - && rm cudasign.pub && \
echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/cuda.list
ENV CUDA_VERSION 8.0.61
ENV CUDA_PKG_VERSION 8-0=$CUDA_VERSION-1
RUN apt-get update && apt-get install -y --no-install-recommends \
cuda-nvrtc-$CUDA_PKG_VERSION \
cuda-nvgraph-$CUDA_PKG_VERSION \
cuda-cusolver-$CUDA_PKG_VERSION \
cuda-cublas-8-0=8.0.61.1-1 \
cuda-cufft-$CUDA_PKG_VERSION \
cuda-curand-$CUDA_PKG_VERSION \
cuda-cusparse-$CUDA_PKG_VERSION \
cuda-npp-$CUDA_PKG_VERSION \
cuda-cudart-$CUDA_PKG_VERSION && \
ln -s cuda-8.0 /usr/local/cuda && \
rm -rf /var/lib/apt/lists/*
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
RUN apt-get update && apt-get install -y --no-install-recommends \
cuda-core-$CUDA_PKG_VERSION \
cuda-misc-headers-$CUDA_PKG_VERSION \
cuda-command-line-tools-$CUDA_PKG_VERSION \
cuda-nvrtc-dev-$CUDA_PKG_VERSION \
cuda-nvml-dev-$CUDA_PKG_VERSION \
cuda-nvgraph-dev-$CUDA_PKG_VERSION \
cuda-cusolver-dev-$CUDA_PKG_VERSION \
cuda-cublas-dev-8-0=8.0.61.1-1 \
cuda-cufft-dev-$CUDA_PKG_VERSION \
cuda-curand-dev-$CUDA_PKG_VERSION \
cuda-cusparse-dev-$CUDA_PKG_VERSION \
cuda-npp-dev-$CUDA_PKG_VERSION \
cuda-cudart-dev-$CUDA_PKG_VERSION \
cuda-driver-dev-$CUDA_PKG_VERSION && \
rm -rf /var/lib/apt/lists/*
ENV LIBRARY_PATH /usr/local/cuda/lib64/stubs:${LIBRARY_PATH}
RUN echo "deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/nvidia-ml.list
ENV CUDNN_VERSION 6.0.21
LABEL com.nvidia.cudnn.version="${CUDNN_VERSION}"
RUN apt-get update && apt-get install -y --no-install-recommends \
libcudnn6=$CUDNN_VERSION-1+cuda8.0 \
libcudnn6-dev=$CUDNN_VERSION-1+cuda8.0 && \
rm -rf /var/lib/apt/lists/*
'Cloud Computing > Docker' 카테고리의 다른 글
Jupyter Notebook(스크랩) (1) | 2017.07.14 |
---|---|
Nvidia-Docker 정리(나름) (0) | 2017.07.14 |
Nvidia-Docker 정리(나름) (0) | 2017.06.02 |
Docker 특강 Day 2 명렁어 (0) | 2017.02.17 |
Virtualization vs Containerization (0) | 2017.02.17 |