fmab777 commited on
Commit
6cb92c7
·
verified ·
1 Parent(s): 76be54d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -3
Dockerfile CHANGED
@@ -31,8 +31,7 @@ EXPOSE ${PORT:-7860}
31
  # Define environment variable to ensure Python output is sent straight to logs
32
  ENV PYTHONUNBUFFERED=1
33
 
34
- # Command to run the application using Gunicorn
35
  # It will run the Starlette 'app' object found in the 'main' module (main.py)
36
  # Listen on all interfaces (0.0.0.0) on the port specified by HF/env var (usually 7860)
37
- # Using environment variable expansion for port binding
38
- CMD ["gunicorn", "-k", "uvicorn.workers.UvicornWorker", "--bind", "0.0.0.0:${PORT:-7860}", "main:app"]
 
31
  # Define environment variable to ensure Python output is sent straight to logs
32
  ENV PYTHONUNBUFFERED=1
33
 
34
+ # Command to run the application using Gunicorn (SHELL FORM for variable expansion)
35
  # It will run the Starlette 'app' object found in the 'main' module (main.py)
36
  # Listen on all interfaces (0.0.0.0) on the port specified by HF/env var (usually 7860)
37
+ CMD gunicorn -k uvicorn.workers.UvicornWorker --bind 0.0.0.0:${PORT:-7860} main:app