DarkMo0o commited on
Commit
de43742
·
verified ·
1 Parent(s): d314308

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -5
Dockerfile CHANGED
@@ -15,16 +15,15 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
15
  # Copy requirements first (to leverage Docker caching)
16
  COPY requirements.txt .
17
 
18
- # Upgrade pip and install Python dependencies
19
  RUN pip install --no-cache-dir --upgrade pip \
20
  && pip install --no-cache-dir -r requirements.txt
21
 
22
  # Copy the rest of the application files
23
  COPY . .
24
 
25
- # Expose port (HF Spaces use 7860 by default flask here uses 7860)
26
  EXPOSE 7860
27
 
28
- # Start the server
29
- # Note: We use uvicorn (ASGI interface) to run the Flask app via ASGI handler
30
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
15
  # Copy requirements first (to leverage Docker caching)
16
  COPY requirements.txt .
17
 
18
+ # Install Python dependencies
19
  RUN pip install --no-cache-dir --upgrade pip \
20
  && pip install --no-cache-dir -r requirements.txt
21
 
22
  # Copy the rest of the application files
23
  COPY . .
24
 
25
+ # Expose port 7860 (port used by Hugging Face Spaces)
26
  EXPOSE 7860
27
 
28
+ # Start the server using uvicorn and the ASGI wrapper
29
+ CMD ["uvicorn", "app:asgi_app", "--host", "0.0.0.0", "--port", "7860"]