Update Dockerfile
Browse files- Dockerfile +6 -2
Dockerfile
CHANGED
@@ -2,9 +2,10 @@ FROM nvidia/cuda:11.8.0-devel-ubuntu22.04
|
|
2 |
# Set up a new user named "user" with user ID 1000
|
3 |
RUN useradd -m -u 1000 user
|
4 |
|
|
|
|
|
5 |
# Switch to the "user" user
|
6 |
-
USER
|
7 |
-
|
8 |
# Set home to the user's home directory
|
9 |
ENV HOME=/home/user \
|
10 |
PATH=/home/user/.local/bin:$PATH
|
@@ -12,6 +13,9 @@ ENV HOME=/home/user \
|
|
12 |
# Set the working directory to the user's home directory
|
13 |
WORKDIR $HOME/app
|
14 |
|
|
|
|
|
|
|
15 |
# Install necessary packages
|
16 |
RUN apt update && apt install git build-essential libopenblas-dev wget python3-pip -y
|
17 |
RUN apt update && apt install -y wget
|
|
|
2 |
# Set up a new user named "user" with user ID 1000
|
3 |
RUN useradd -m -u 1000 user
|
4 |
|
5 |
+
# Set up a new user named "user" with user ID 1000
|
6 |
+
RUN useradd -m -u 1000 user
|
7 |
# Switch to the "user" user
|
8 |
+
USER user
|
|
|
9 |
# Set home to the user's home directory
|
10 |
ENV HOME=/home/user \
|
11 |
PATH=/home/user/.local/bin:$PATH
|
|
|
13 |
# Set the working directory to the user's home directory
|
14 |
WORKDIR $HOME/app
|
15 |
|
16 |
+
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
17 |
+
COPY --chown=user . $HOME/app
|
18 |
+
|
19 |
# Install necessary packages
|
20 |
RUN apt update && apt install git build-essential libopenblas-dev wget python3-pip -y
|
21 |
RUN apt update && apt install -y wget
|