Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +12 -5
Dockerfile
CHANGED
|
@@ -65,14 +65,21 @@ RUN mkdir -p /tmp/uploads && chmod 777 /tmp/uploads
|
|
| 65 |
COPY docker/entrypoint-hf.sh /app/entrypoint.sh
|
| 66 |
RUN chmod +x /app/entrypoint.sh
|
| 67 |
|
| 68 |
-
# Set environment variables
|
| 69 |
-
ENV
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
|
| 74 |
# Expose Gradio port (HF Spaces expects 7860)
|
| 75 |
EXPOSE 7860
|
| 76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
# Run Gradio app via entrypoint
|
| 78 |
CMD ["/app/entrypoint.sh"]
|
|
|
|
| 65 |
COPY docker/entrypoint-hf.sh /app/entrypoint.sh
|
| 66 |
RUN chmod +x /app/entrypoint.sh
|
| 67 |
|
| 68 |
+
# Set environment variables for Hugging Face Spaces
|
| 69 |
+
ENV GRADIO_SERVER_NAME="0.0.0.0" \
|
| 70 |
+
GRADIO_SERVER_PORT="7860" \
|
| 71 |
+
PYTHONUNBUFFERED=1 \
|
| 72 |
+
PYTHONPATH=/app
|
| 73 |
|
| 74 |
# Expose Gradio port (HF Spaces expects 7860)
|
| 75 |
EXPOSE 7860
|
| 76 |
|
| 77 |
+
# Expose MCP Toolbox port (internal - for communication between services)
|
| 78 |
+
EXPOSE 5000
|
| 79 |
+
|
| 80 |
+
# Health check
|
| 81 |
+
HEALTHCHECK --interval=30s --timeout=10s --start-period=90s --retries=3 \
|
| 82 |
+
CMD curl -f http://localhost:7860/ || exit 1
|
| 83 |
+
|
| 84 |
# Run Gradio app via entrypoint
|
| 85 |
CMD ["/app/entrypoint.sh"]
|