ayush2917 commited on
Commit
84f5589
·
verified ·
1 Parent(s): d144e07

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -3
Dockerfile CHANGED
@@ -1,10 +1,21 @@
1
- # Dockerfile
2
  FROM python:3.9-slim
3
 
4
  WORKDIR /app
5
- COPY . .
6
 
 
 
 
 
 
 
 
7
  RUN pip install --no-cache-dir -r requirements.txt
8
 
 
 
 
 
9
  EXPOSE 7860
10
- CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]
 
 
 
 
1
  FROM python:3.9-slim
2
 
3
  WORKDIR /app
 
4
 
5
+ # Install system dependencies first
6
+ RUN apt-get update && \
7
+ apt-get install -y --no-install-recommends gcc python3-dev && \
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 application code
15
+ COPY . .
16
+
17
+ ENV PORT 7860
18
  EXPOSE 7860
19
+
20
+ # Use the full path to gunicorn
21
+ CMD ["python", "-m", "gunicorn", "--bind", "0.0.0.0:7860", "--timeout", "120", "app:app"]