Spaces:
Paused
Paused
E-Hospital
commited on
Commit
•
ff66f40
1
Parent(s):
f320be5
Update Dockerfile
Browse files- Dockerfile +7 -55
Dockerfile
CHANGED
@@ -1,66 +1,18 @@
|
|
1 |
-
FROM
|
2 |
|
3 |
WORKDIR /code
|
4 |
|
5 |
-
|
6 |
-
# For example, let's say you want to install Python and pip
|
7 |
-
RUN apt-get update && apt-get install -y --no-install-recommends \
|
8 |
-
gnupg2 curl ca-certificates && \
|
9 |
-
curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub | apt-key add - && \
|
10 |
-
echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/cuda.list && \
|
11 |
-
echo "deb https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/nvidia-ml.list && \
|
12 |
-
apt-get purge --autoremove -y curl \
|
13 |
-
&& rm -rf /var/lib/apt/lists/*
|
14 |
|
15 |
-
|
16 |
-
ENV CUDA_PKG_VERSION 10-1=$CUDA_VERSION-1
|
17 |
|
18 |
-
|
19 |
-
RUN apt-get update && apt-get install -y --no-install-recommends \
|
20 |
-
cuda-cudart-$CUDA_PKG_VERSION \
|
21 |
-
cuda-compat-10-1 \
|
22 |
-
&& ln -s cuda-10.1 /usr/local/cuda && \
|
23 |
-
rm -rf /var/lib/apt/lists/*
|
24 |
|
25 |
-
|
26 |
-
RUN echo "/usr/local/nvidia/lib" >> /etc/ld.so.conf.d/nvidia.conf && \
|
27 |
-
echo "/usr/local/nvidia/lib64" >> /etc/ld.so.conf.d/nvidia.conf
|
28 |
|
29 |
-
|
30 |
-
ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64
|
31 |
|
32 |
-
|
33 |
-
###########################################################################
|
34 |
-
#runtime next
|
35 |
-
ENV NCCL_VERSION 2.7.8
|
36 |
-
|
37 |
-
RUN apt-get update && apt-get install -y --no-install-recommends \
|
38 |
-
cuda-libraries-$CUDA_PKG_VERSION \
|
39 |
-
cuda-npp-$CUDA_PKG_VERSION \
|
40 |
-
cuda-nvtx-$CUDA_PKG_VERSION \
|
41 |
-
libcublas10=10.2.1.243-1 \
|
42 |
-
libnccl2=$NCCL_VERSION-1+cuda10.1 \
|
43 |
-
&& apt-mark hold libnccl2 \
|
44 |
-
&& rm -rf /var/lib/apt/lists/*
|
45 |
-
|
46 |
-
# apt from auto upgrading the cublas package. See https://gitlab.com/nvidia/container-images/cuda/-/issues/88
|
47 |
-
RUN apt-mark hold libcublas10
|
48 |
-
|
49 |
-
|
50 |
-
###########################################################################
|
51 |
-
#cudnn7 (not cudnn8) next
|
52 |
-
|
53 |
-
ENV CUDNN_VERSION 7.6.5.32
|
54 |
-
|
55 |
-
RUN apt-get update && apt-get install -y --no-install-recommends \
|
56 |
-
libcudnn7=$CUDNN_VERSION-1+cuda10.1 \
|
57 |
-
&& apt-mark hold libcudnn7 && \
|
58 |
-
rm -rf /var/lib/apt/lists/*
|
59 |
-
|
60 |
-
|
61 |
-
ENV NVIDIA_VISIBLE_DEVICES all
|
62 |
-
ENV NVIDIA_DRIVER_CAPABILITIES all
|
63 |
-
ENV NVIDIA_REQUIRE_CUDA "cuda>=10.1"
|
64 |
|
65 |
COPY ./requirements.txt /code/requirements.txt
|
66 |
|
|
|
1 |
+
FROM nvidia/cuda:12.2.2-base-ubuntu22.04
|
2 |
|
3 |
WORKDIR /code
|
4 |
|
5 |
+
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
+
RUN apt update
|
|
|
8 |
|
9 |
+
RUN apt install software-properties-common -y
|
|
|
|
|
|
|
|
|
|
|
10 |
|
11 |
+
RUN add-apt-repository ppa:deadsnakes/ppa
|
|
|
|
|
12 |
|
13 |
+
RUN apt install -y Python3.10
|
|
|
14 |
|
15 |
+
RUN apt-get install git-all
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
COPY ./requirements.txt /code/requirements.txt
|
18 |
|