Hammad712 commited on
Commit
65c604f
·
1 Parent(s): 8f1085b

update dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -7
Dockerfile CHANGED
@@ -20,14 +20,13 @@ COPY requirements.txt .
20
 
21
  # Upgrade pip, install all Python dependencies, then install PyTorch CPU wheels
22
  RUN pip install --upgrade pip && \
23
- pip install -r requirements.txt && \
24
- pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
25
-
26
  # Copy the rest of the application code
27
  COPY . .
28
 
29
- # Expose port 8000 for the FastAPI app
30
- EXPOSE 8000
31
 
32
- # By default, run uvicorn to serve the FastAPI app
33
- CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
 
20
 
21
  # Upgrade pip, install all Python dependencies, then install PyTorch CPU wheels
22
  RUN pip install --upgrade pip && \
23
+ pip install -r requirements.txt
24
+
 
25
  # Copy the rest of the application code
26
  COPY . .
27
 
28
+ # Expose port 8080 for Cloud Run
29
+ EXPOSE 8080
30
 
31
+ # Run the app on port 8080 to match Cloud Run's requirement
32
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8080"]