Spaces:
Runtime error
Runtime error
1halfplusminus
commited on
Commit
•
94f4744
1
Parent(s):
c864155
feat: fix dockerfile
Browse files- Dockerfile +3 -3
Dockerfile
CHANGED
@@ -10,9 +10,9 @@ COPY ./requirements.txt /code/requirements.txt
|
|
10 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
11 |
|
12 |
# Set up a new user named "user" with user ID 1000
|
13 |
-
|
14 |
# Switch to the "user" user
|
15 |
-
|
16 |
# Set home to the user's home directory
|
17 |
ENV HOME=/home/user \
|
18 |
PATH=/home/user/.local/bin:$PATH
|
@@ -21,7 +21,7 @@ ENV HOME=/home/user \
|
|
21 |
WORKDIR $HOME/app
|
22 |
COPY main.py main.py
|
23 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
24 |
-
COPY export.pkl export.pkl
|
25 |
|
26 |
EXPOSE 7860
|
27 |
|
|
|
10 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
11 |
|
12 |
# Set up a new user named "user" with user ID 1000
|
13 |
+
RUN useradd -m -u 1000 user
|
14 |
# Switch to the "user" user
|
15 |
+
USER user
|
16 |
# Set home to the user's home directory
|
17 |
ENV HOME=/home/user \
|
18 |
PATH=/home/user/.local/bin:$PATH
|
|
|
21 |
WORKDIR $HOME/app
|
22 |
COPY main.py main.py
|
23 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
24 |
+
COPY --chown=user export.pkl export.pkl
|
25 |
|
26 |
EXPOSE 7860
|
27 |
|