Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +11 -4
Dockerfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
FROM pytorch/pytorch:2.1
|
2 |
|
3 |
ENV DEBIAN_FRONTEND=noninteractive
|
4 |
ENV MKL_THREADING_LAYER=GNU
|
@@ -6,17 +6,24 @@ ENV MKL_THREADING_LAYER=GNU
|
|
6 |
# Install dependencies
|
7 |
RUN apt-get update && apt-get install -y \
|
8 |
git wget libgl1-mesa-glx libglib2.0-0 ffmpeg libx264-dev pkg-config \
|
9 |
-
build-essential cmake g++ python3-dev
|
10 |
-
wget gnupg2 libopenblas-dev && \
|
11 |
rm -rf /var/lib/apt/lists/*
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
# Add NVIDIA package repositories
|
14 |
RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb && \
|
15 |
dpkg -i cuda-keyring_1.0-1_all.deb && \
|
16 |
apt-get update
|
17 |
|
18 |
# Install CUDA Toolkit and cuDNN
|
19 |
-
RUN apt-get install -y cuda-toolkit-11-
|
20 |
|
21 |
# Create a user
|
22 |
RUN useradd -m -u 1000 user
|
|
|
1 |
+
FROM pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime
|
2 |
|
3 |
ENV DEBIAN_FRONTEND=noninteractive
|
4 |
ENV MKL_THREADING_LAYER=GNU
|
|
|
6 |
# Install dependencies
|
7 |
RUN apt-get update && apt-get install -y \
|
8 |
git wget libgl1-mesa-glx libglib2.0-0 ffmpeg libx264-dev pkg-config \
|
9 |
+
build-essential cmake g++ python3.9 python3.9-dev python3.9-venv \
|
10 |
+
software-properties-common wget gnupg2 libopenblas-dev && \
|
11 |
rm -rf /var/lib/apt/lists/*
|
12 |
|
13 |
+
# Ensure Python 3.9 is the default version
|
14 |
+
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1 && \
|
15 |
+
update-alternatives --set python3 /usr/bin/python3.9
|
16 |
+
|
17 |
+
# Install pip for Python 3.9
|
18 |
+
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.9
|
19 |
+
|
20 |
# Add NVIDIA package repositories
|
21 |
RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb && \
|
22 |
dpkg -i cuda-keyring_1.0-1_all.deb && \
|
23 |
apt-get update
|
24 |
|
25 |
# Install CUDA Toolkit and cuDNN
|
26 |
+
RUN apt-get install -y cuda-toolkit-11-7 libcudnn8 libcudnn8-dev
|
27 |
|
28 |
# Create a user
|
29 |
RUN useradd -m -u 1000 user
|