natalieparker commited on
Commit
f71683a
·
verified ·
1 Parent(s): ced562d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -1
Dockerfile CHANGED
@@ -2,10 +2,20 @@ FROM python:3.10
2
 
3
  WORKDIR /app
4
 
 
 
 
 
 
 
5
  COPY requirements.txt .
6
  RUN pip install --no-cache-dir -r requirements.txt
7
 
 
8
  COPY . .
9
 
 
10
  EXPOSE 7860
11
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
2
 
3
  WORKDIR /app
4
 
5
+ # Install system dependencies
6
+ RUN apt-get update && apt-get install -y \
7
+ git \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ # Install Python dependencies
11
  COPY requirements.txt .
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
14
+ # Copy app files
15
  COPY . .
16
 
17
+ # Expose port 7860 for HF Spaces
18
  EXPOSE 7860
19
+
20
+ # Run FastAPI server
21
+ CMD ["python", "app.py"]