Spaces:
Paused
Paused
AurelioAguirre
commited on
Commit
·
142c3be
1
Parent(s):
4bcb998
Running main app v21
Browse files- Dockerfile +9 -14
Dockerfile
CHANGED
@@ -1,23 +1,18 @@
|
|
1 |
FROM python:3.9
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
# Copy requirements first to leverage Docker cache
|
7 |
-
COPY requirements.txt .
|
8 |
|
9 |
-
|
10 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
11 |
|
12 |
-
|
13 |
-
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
ENV PYTHONUNBUFFERED=1
|
18 |
|
19 |
-
|
20 |
-
EXPOSE 7680
|
21 |
|
22 |
# Use same command as working version
|
23 |
CMD ["python", "-m", "main.app"]
|
|
|
1 |
FROM python:3.9
|
2 |
|
3 |
+
RUN useradd -m -u 1000 user
|
4 |
+
USER user
|
5 |
+
ENV PATH="/home/user/.local/bin:$PATH"
|
|
|
|
|
6 |
|
7 |
+
WORKDIR /app
|
|
|
8 |
|
9 |
+
COPY --chown=user ./requirements.txt requirements.txt
|
10 |
+
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
11 |
|
12 |
+
COPY --chown=user . /app
|
13 |
+
COPY --chown=user main/ /app/main
|
|
|
14 |
|
15 |
+
EXPOSE 7860
|
|
|
16 |
|
17 |
# Use same command as working version
|
18 |
CMD ["python", "-m", "main.app"]
|