Spaces:
Runtime error
Runtime error
Kangarroar
commited on
Commit
•
542422c
1
Parent(s):
281f635
Update Dockerfile
Browse files- Dockerfile +7 -7
Dockerfile
CHANGED
@@ -1,20 +1,20 @@
|
|
1 |
-
FROM python:3.
|
2 |
|
3 |
-
WORKDIR /
|
4 |
|
5 |
-
|
|
|
|
|
6 |
|
7 |
-
# Set up a new user named "user" with user ID 1000
|
8 |
RUN useradd -m -u 1000 user
|
9 |
|
10 |
-
# Switch to the "user" user
|
11 |
USER user
|
12 |
|
13 |
-
# Set home to the user's home directory
|
14 |
ENV HOME=/home/user \
|
15 |
PATH=/home/user/.local/bin:$PATH
|
16 |
|
17 |
-
|
|
|
18 |
COPY --chown=user . $HOME/app
|
19 |
|
20 |
EXPOSE 8501
|
|
|
1 |
+
FROM python:3.9
|
2 |
|
3 |
+
WORKDIR /code
|
4 |
|
5 |
+
COPY ./requirements.txt /code/requirements.txt
|
6 |
+
|
7 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
8 |
|
|
|
9 |
RUN useradd -m -u 1000 user
|
10 |
|
|
|
11 |
USER user
|
12 |
|
|
|
13 |
ENV HOME=/home/user \
|
14 |
PATH=/home/user/.local/bin:$PATH
|
15 |
|
16 |
+
WORKDIR $HOME/app
|
17 |
+
|
18 |
COPY --chown=user . $HOME/app
|
19 |
|
20 |
EXPOSE 8501
|