Hammad712 commited on
Commit
d49c909
·
verified ·
1 Parent(s): ead2455

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -5
Dockerfile CHANGED
@@ -10,15 +10,15 @@ WORKDIR /app
10
  # Copy only requirements first to leverage Docker layer caching
11
  COPY requirements.txt .
12
 
13
- # Upgrade pip, install all Python dependencies, then install PyTorch CPU wheels
14
  RUN pip install --upgrade pip && \
15
  pip install -r requirements.txt
16
 
17
  # Copy the rest of the application code
18
  COPY . .
19
 
20
- # Expose port 8080 for Cloud Run
21
- EXPOSE 8080
22
 
23
- # Run the app on port 8080 to match Cloud Run's requirement
24
- CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8080"]
 
10
  # Copy only requirements first to leverage Docker layer caching
11
  COPY requirements.txt .
12
 
13
+ # Upgrade pip, install all Python dependencies
14
  RUN pip install --upgrade pip && \
15
  pip install -r requirements.txt
16
 
17
  # Copy the rest of the application code
18
  COPY . .
19
 
20
+ # Expose port 7860 for Hugging Face Spaces
21
+ EXPOSE 7860
22
 
23
+ # Run the app on port 7860 (REQUIRED for Hugging Face)
24
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]