Spaces:
Paused
Paused
Update Docker
Browse files
Docker
CHANGED
@@ -1,22 +1,13 @@
|
|
1 |
-
|
2 |
-
FROM python:3.9-slim
|
3 |
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
|
8 |
-
# Set the working directory
|
9 |
WORKDIR /app
|
10 |
|
11 |
-
|
12 |
-
|
13 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
# Expose the default MLflow port
|
19 |
-
EXPOSE 7860
|
20 |
-
|
21 |
-
# Set the command to run the app
|
22 |
-
CMD ["python", "app.py"]
|
|
|
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 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
|
|
|
|
|
|
|
|