Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +7 -5
Dockerfile
CHANGED
|
@@ -1,14 +1,16 @@
|
|
| 1 |
-
# Use the official Hugging Face Spaces base image
|
| 2 |
FROM huggingface/spaces-python:latest
|
| 3 |
|
| 4 |
-
# Install
|
| 5 |
-
|
|
|
|
| 6 |
|
| 7 |
-
# Copy app
|
| 8 |
COPY app.py /app/app.py
|
| 9 |
|
| 10 |
-
# Expose port 7860 (standard for Spaces) or any you want
|
| 11 |
EXPOSE 7860
|
| 12 |
|
| 13 |
# Run the FastAPI app with uvicorn
|
| 14 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use the official Hugging Face Spaces Python base image
|
| 2 |
FROM huggingface/spaces-python:latest
|
| 3 |
|
| 4 |
+
# Install only your extra dependencies
|
| 5 |
+
COPY requirements.txt /app/requirements.txt
|
| 6 |
+
RUN pip install --no-cache-dir -r /app/requirements.txt
|
| 7 |
|
| 8 |
+
# Copy your app code
|
| 9 |
COPY app.py /app/app.py
|
| 10 |
|
|
|
|
| 11 |
EXPOSE 7860
|
| 12 |
|
| 13 |
# Run the FastAPI app with uvicorn
|
| 14 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
| 15 |
+
|
| 16 |
+
|