12ongo commited on
Commit
2a1f1bd
·
verified ·
1 Parent(s): 0268d9a

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. 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
- CMD ["python", "app.py"]
 
 
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"]