mahesh1209 commited on
Commit
5a5d68d
·
verified ·
1 Parent(s): 85e1e37

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -12
Dockerfile CHANGED
@@ -1,21 +1,12 @@
1
- # Use a slim Python base image
2
  FROM python:3.11-slim
3
 
4
- # Ensure pip is up-to-date
5
- RUN pip install --no-cache-dir --upgrade pip
6
-
7
- # Create workdir
8
  WORKDIR /app
9
 
10
- # Copy dependency list and install
11
- COPY requirements.txt /app/
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
14
- # Copy app code
15
- COPY api /app/api
16
 
17
- # Spaces expect the app to listen on port 7860
18
  EXPOSE 7860
19
 
20
- # Start via gunicorn, binding to 0.0.0.0:7860
21
- CMD ["gunicorn", "-w", "2", "-b", "0.0.0.0:7860", "api.app:app"]
 
 
1
  FROM python:3.11-slim
2
 
 
 
 
 
3
  WORKDIR /app
4
 
5
+ COPY requirements.txt .
 
6
  RUN pip install --no-cache-dir -r requirements.txt
7
 
8
+ COPY app.py .
 
9
 
 
10
  EXPOSE 7860
11
 
12
+ CMD ["gunicorn", "-w", "2", "-b", "0.0.0.0:7860", "app:app"]