Spaces:
Paused
Paused
move user to bottom
Browse files- Dockerfile +13 -13
Dockerfile
CHANGED
@@ -1,18 +1,5 @@
|
|
1 |
FROM --platform=amd64 nvcr.io/nvidia/cuda:12.1.0-devel-ubuntu22.04 as base
|
2 |
|
3 |
-
# Set up a new user named "user" with user ID 1000
|
4 |
-
RUN useradd -m -u 1000 user
|
5 |
-
|
6 |
-
# Switch to the "user" user
|
7 |
-
USER user
|
8 |
-
|
9 |
-
# Set home to the user's home directory
|
10 |
-
ENV HOME=/home/user \
|
11 |
-
PATH=/home/user/.local/bin:$PATH
|
12 |
-
|
13 |
-
# Set the working directory to the user's home directory
|
14 |
-
WORKDIR $HOME/app
|
15 |
-
|
16 |
RUN apt update && \
|
17 |
apt install -y python3-pip python3-packaging \
|
18 |
git ninja-build && \
|
@@ -34,6 +21,19 @@ RUN git clone https://github.com/NVIDIA/apex && \
|
|
34 |
sed -i '/check_cuda_torch_binary_vs_bare_metal(CUDA_HOME)/d' setup.py && \
|
35 |
python3 setup.py install --cpp_ext --cuda_ext
|
36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
COPY entrypoint.sh .
|
38 |
|
39 |
RUN chmod +x $HOME/app/entrypoint.sh
|
|
|
1 |
FROM --platform=amd64 nvcr.io/nvidia/cuda:12.1.0-devel-ubuntu22.04 as base
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
RUN apt update && \
|
4 |
apt install -y python3-pip python3-packaging \
|
5 |
git ninja-build && \
|
|
|
21 |
sed -i '/check_cuda_torch_binary_vs_bare_metal(CUDA_HOME)/d' setup.py && \
|
22 |
python3 setup.py install --cpp_ext --cuda_ext
|
23 |
|
24 |
+
# Set up a new user named "user" with user ID 1000
|
25 |
+
RUN useradd -m -u 1000 user
|
26 |
+
|
27 |
+
# Switch to the "user" user
|
28 |
+
USER user
|
29 |
+
|
30 |
+
# Set home to the user's home directory
|
31 |
+
ENV HOME=/home/user \
|
32 |
+
PATH=/home/user/.local/bin:$PATH
|
33 |
+
|
34 |
+
# Set the working directory to the user's home directory
|
35 |
+
WORKDIR $HOME/app
|
36 |
+
|
37 |
COPY entrypoint.sh .
|
38 |
|
39 |
RUN chmod +x $HOME/app/entrypoint.sh
|