Spaces:
Runtime error
Runtime error
Upload Dockerfile
Browse files- Dockerfile +3 -2
Dockerfile
CHANGED
|
@@ -19,5 +19,6 @@ COPY deployment_files/sales_predictor.joblib /app/deployment_files/sales_predict
|
|
| 19 |
# Expose default port used by Spaces if PORT is not provided
|
| 20 |
EXPOSE 7860
|
| 21 |
|
| 22 |
-
# Start the API
|
| 23 |
-
|
|
|
|
|
|
| 19 |
# Expose default port used by Spaces if PORT is not provided
|
| 20 |
EXPOSE 7860
|
| 21 |
|
| 22 |
+
# Start the API using gunicorn, binding to the dynamic PORT provided by HF Spaces
|
| 23 |
+
ENV PORT=7860
|
| 24 |
+
CMD ["gunicorn", "-w", "2", "-k", "gthread", "-b", "0.0.0.0:${PORT}", "app:sales_predictor_api"]
|