Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +13 -4
Dockerfile
CHANGED
@@ -1,12 +1,21 @@
|
|
1 |
FROM python:latest
|
2 |
|
3 |
-
WORKDIR /
|
4 |
|
5 |
-
COPY ./requirements.txt .
|
6 |
|
7 |
-
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
8 |
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
|
11 |
EXPOSE 7860
|
12 |
|
|
|
1 |
FROM python:latest
|
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 7860
|
21 |
|