Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +7 -5
Dockerfile
CHANGED
|
@@ -1,7 +1,9 @@
|
|
| 1 |
FROM python:3.9-slim
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
| 4 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "1", "app:app"]
|
|
|
|
| 1 |
FROM python:3.9-slim
|
| 2 |
+
RUN useradd -m -u 1000 user
|
| 3 |
+
USER user
|
| 4 |
+
ENV PATH="/home/user/.local/bin:$PATH"
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
COPY --chown=user ./requirements.txt requirements.txt
|
| 7 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 8 |
+
COPY --chown=user . /app
|
| 9 |
+
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--worker-tmp-dir", "/dev/shm", "app:app"]
|
|
|