Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +6 -15
Dockerfile
CHANGED
@@ -1,24 +1,18 @@
|
|
1 |
FROM nvidia/cuda:11.3.1-cudnn8-devel-ubuntu18.04
|
2 |
#CMD nvidia-smi
|
3 |
|
4 |
-
ENV DEBIAN_FRONTEND
|
|
|
|
|
5 |
|
6 |
# Install Git, Python 3.9, and required packages
|
7 |
RUN apt-get update && \
|
8 |
-
apt-get install -y git python3 python3-dev python3-pip && \
|
9 |
apt-get clean && \
|
10 |
-
rm -rf /var/lib/apt/lists/*
|
11 |
-
|
12 |
-
# Install pip for Python 3.9
|
13 |
-
RUN wget https://bootstrap.pypa.io/get-pip.py && \
|
14 |
python get-pip.py && \
|
15 |
rm get-pip.py
|
16 |
-
|
17 |
-
# Install Git
|
18 |
-
RUN apt-get update && \
|
19 |
-
apt-get install -y git && \
|
20 |
-
apt-get clean && \
|
21 |
-
rm -rf /var/lib/apt/lists/*
|
22 |
|
23 |
# Set up a new user named "user" with user ID 1000
|
24 |
RUN useradd -m -u 1000 user
|
@@ -26,9 +20,6 @@ RUN useradd -m -u 1000 user
|
|
26 |
# Switch to the "user" user
|
27 |
USER user
|
28 |
|
29 |
-
# Set home to the user's home directory
|
30 |
-
ENV HOME=/home/user \
|
31 |
-
PATH=/home/user/.local/bin:$PATH
|
32 |
|
33 |
# Set the working directory to the user's home directory
|
34 |
WORKDIR $HOME/app
|
|
|
1 |
FROM nvidia/cuda:11.3.1-cudnn8-devel-ubuntu18.04
|
2 |
#CMD nvidia-smi
|
3 |
|
4 |
+
ENV DEBIAN_FRONTEND=noninteractive \
|
5 |
+
HOME=/home/user \
|
6 |
+
PATH=/home/user/.local/bin:$PATH
|
7 |
|
8 |
# Install Git, Python 3.9, and required packages
|
9 |
RUN apt-get update && \
|
10 |
+
apt-get install -y git python3 python3-dev python3-pip wget libgl1-mesa-glx && \
|
11 |
apt-get clean && \
|
12 |
+
rm -rf /var/lib/apt/lists/* && \
|
13 |
+
wget https://bootstrap.pypa.io/get-pip.py && \
|
|
|
|
|
14 |
python get-pip.py && \
|
15 |
rm get-pip.py
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
# Set up a new user named "user" with user ID 1000
|
18 |
RUN useradd -m -u 1000 user
|
|
|
20 |
# Switch to the "user" user
|
21 |
USER user
|
22 |
|
|
|
|
|
|
|
23 |
|
24 |
# Set the working directory to the user's home directory
|
25 |
WORKDIR $HOME/app
|