Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +9 -7
Dockerfile
CHANGED
@@ -1,20 +1,22 @@
|
|
1 |
-
# Use the official python 3.
|
2 |
FROM python:3.10-slim-bullseye
|
3 |
|
4 |
-
# Set the working directory to
|
5 |
-
WORKDIR /code
|
6 |
-
|
7 |
RUN useradd -m -u 1000 user
|
8 |
USER user
|
9 |
|
|
|
|
|
|
|
|
|
10 |
|
11 |
# Copy the requirements to working directory
|
12 |
-
COPY --chown=user:user ./requirements.txt
|
13 |
|
14 |
# Install all packages in requirements.txt
|
15 |
-
RUN pip install --no-cache-dir --upgrade -r
|
16 |
|
17 |
-
COPY --chown=user:user . /
|
18 |
|
19 |
EXPOSE 7860
|
20 |
|
|
|
1 |
+
# Use the official python 3.10 image
|
2 |
FROM python:3.10-slim-bullseye
|
3 |
|
4 |
+
# Set the working directory to user's home folder
|
|
|
|
|
5 |
RUN useradd -m -u 1000 user
|
6 |
USER user
|
7 |
|
8 |
+
ENV HOME=/home/user \
|
9 |
+
PATH=/home/user/.local/bin:$PATH
|
10 |
+
|
11 |
+
WORKDIR $HOME/app
|
12 |
|
13 |
# Copy the requirements to working directory
|
14 |
+
COPY --chown=user:user ./requirements.txt ./requirements.txt
|
15 |
|
16 |
# Install all packages in requirements.txt
|
17 |
+
RUN pip install --no-cache-dir --upgrade -r ./requirements.txt
|
18 |
|
19 |
+
COPY --chown=user:user . $HOME/app
|
20 |
|
21 |
EXPOSE 7860
|
22 |
|