Sugamdeol commited on
Commit
f91f4dd
·
verified ·
1 Parent(s): 274cd9c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -5
Dockerfile CHANGED
@@ -17,8 +17,9 @@ RUN pip install --no-cache-dir -r requirements.txt
17
  # Copy the rest of your application code
18
  COPY . .
19
 
20
- # Expose the port that the application will run on
21
- EXPOSE 7860
22
-
23
- # NO CMD OR ENTRYPOINT LINE HERE
24
- # The Hugging Face platform will provide the command to run the app.
 
 
17
  # Copy the rest of your application code
18
  COPY . .
19
 
20
+ # --- THIS IS THE DEFINITIVE STARTUP COMMAND ---
21
+ # It tells the container exactly how to run the web server.
22
+ # Gunicorn is a robust process manager for production.
23
+ # It uses Uvicorn workers to handle the async FastAPI code.
24
+ # It binds to port 7860 on all network interfaces.
25
+ CMD ["gunicorn", "-w", "2", "-k", "uvicorn.workers.UvicornWorker", "--bind", "0.0.0.0:7860", "app:app"]