Spaces:
Running
Running
Update Dockerfile
Browse files- 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 |
-
|
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
|
|