Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +18 -25
Dockerfile
CHANGED
|
@@ -1,25 +1,18 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
WORKDIR /app
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
RUN chmod +x run.sh
|
| 20 |
-
|
| 21 |
-
# Expose the port Hugging Face looks for
|
| 22 |
-
EXPOSE 7860
|
| 23 |
-
|
| 24 |
-
# Command to run the dual-server script
|
| 25 |
-
CMD ["./run.sh"]
|
|
|
|
| 1 |
+
FROM python:3.10-slim
|
| 2 |
+
|
| 3 |
+
# Force Python logs to show up immediately
|
| 4 |
+
ENV PYTHONUNBUFFERED=1
|
| 5 |
+
|
| 6 |
+
RUN useradd -m -u 1000 user
|
| 7 |
+
USER user
|
| 8 |
+
ENV PATH="/home/user/.local/bin:$PATH"
|
| 9 |
+
|
| 10 |
+
WORKDIR /app
|
| 11 |
+
COPY --chown=user . /app
|
| 12 |
+
|
| 13 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
+
|
| 15 |
+
EXPOSE 7860
|
| 16 |
+
|
| 17 |
+
# Let the Python Orchestrator handle the dual-boot
|
| 18 |
+
CMD ["python", "start.py"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|