-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile.ubuntu.cuda11_1-arm64
72 lines (71 loc) · 3.27 KB
/
Dockerfile.ubuntu.cuda11_1-arm64
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Ubuntu Docker Image
# Build:
# docker build -f Dockerfile.ubuntu.cuda11_1-arm64 -t ubuntu:cuda11_1-arm64 .
#
# Requires Host:
# GPU with Compute Capability (CC) >= 5.3 See https://developer.nvidia.com/cuda-gpus
# CUDA toolkit >= 11.1
# CUDA Docker Runtime Support
#
# Install CUDA Docker Runtime Support:
# distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \
# && curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add - \
# && curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
# sudo apt update && sudo apt install -y nvidia-docker2
# sudo systemctl restart docker
# Ubuntu 18.04 CUDA 11.1 cudnn8
FROM ubuntu:18.04 AS cuda11_1-arm64
ENV DEBIAN_FRONTEND="noninteractive"
ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility
ENV NVIDIA_REQUIRE_CUDA "cuda>=11.1"
ENV NCCL_VERSION 2.8.3
ENV CUDNN_VERSION 8.0.5.39
ENV CUDA_VERSION 11.1.1
RUN apt-get update && apt-get install -y --no-install-recommends \
gnupg2 curl ca-certificates && \
curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/sbsa/7fa2af80.pub | apt-key add - && \
echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/sbsa /" > /etc/apt/sources.list.d/cuda.list && \
echo "deb https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/sbsa /" > /etc/apt/sources.list.d/nvidia-ml.list && \
apt-get purge --autoremove -y curl \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y --no-install-recommends \
cuda-cudart-11-1=11.1.74-1 \
&& ln -s cuda-11.1 /usr/local/cuda && \
rm -rf /var/lib/apt/lists/*
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-libraries-11-1=11.1.1-1 \
libnpp-11-1=11.1.2.301-1 \
cuda-nvtx-11-1=11.1.74-1 \
libcublas-11-1=11.3.0.106-1 \
libcusparse-11-1=11.3.0.10-1 \
libnccl2=$NCCL_VERSION-1+cuda11.1 \
&& rm -rf /var/lib/apt/lists/*
RUN apt-mark hold libcublas-11-1 libnccl2
LABEL com.nvidia.cudnn.version="${CUDNN_VERSION}"
RUN apt-get update && apt-get install -y --no-install-recommends \
libcudnn8=$CUDNN_VERSION-1+cuda11.1 \
&& apt-mark hold libcudnn8 && \
rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y --no-install-recommends \
cuda-cudart-dev-11-1=11.1.74-1 \
cuda-command-line-tools-11-1=11.1.1-1 \
cuda-minimal-build-11-1=11.1.1-1 \
cuda-libraries-dev-11-1=11.1.1-1 \
cuda-nvml-dev-11-1=11.1.74-1 \
libnpp-dev-11-1=11.1.2.301-1 \
libnccl-dev=2.8.3-1+cuda11.1 \
libcublas-dev-11-1=11.3.0.106-1 \
libcusparse-dev-11-1=11.3.0.10-1 \
&& rm -rf /var/lib/apt/lists/*
RUN apt-mark hold libcublas-dev-11-1 libnccl-dev
ENV LIBRARY_PATH /usr/local/cuda/lib64/stubs
RUN apt-get update && apt-get install -y --no-install-recommends \
libcudnn8=$CUDNN_VERSION-1+cuda11.1 \
libcudnn8-dev=$CUDNN_VERSION-1+cuda11.1 \
&& apt-mark hold libcudnn8 && \
rm -rf /var/lib/apt/lists/*