Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +4 -1
Dockerfile
CHANGED
@@ -24,8 +24,11 @@ RUN pip install --no-cache-dir --upgrade pip && \
|
|
24 |
# Copy the rest of the application code
|
25 |
COPY --chown=user . /app
|
26 |
|
27 |
-
# Expose port 7860 (Hugging Face Spaces
|
28 |
EXPOSE 7860
|
29 |
|
|
|
|
|
|
|
30 |
# Start the FastAPI app using uvicorn via python -m
|
31 |
CMD ["python", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
24 |
# Copy the rest of the application code
|
25 |
COPY --chown=user . /app
|
26 |
|
27 |
+
# Expose port 7860 (required by Hugging Face Spaces)
|
28 |
EXPOSE 7860
|
29 |
|
30 |
+
# Optional: Add a label so that Spaces knows which port to use for embedding
|
31 |
+
LABEL HF_SPACE_PORT=7860
|
32 |
+
|
33 |
# Start the FastAPI app using uvicorn via python -m
|
34 |
CMD ["python", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|