HawkeyeHS commited on
Commit
1a02603
·
verified ·
1 Parent(s): c75bfb1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -10
Dockerfile CHANGED
@@ -1,17 +1,12 @@
1
- # Use Python base image
2
- FROM python:3.10
3
 
4
- # Set working directory
5
  WORKDIR /app
6
 
7
- # Copy current files into container
8
- COPY . /app
9
 
10
- # Install Flask
11
- RUN pip install flask gunicorn
12
 
13
- # Expose default port
14
  EXPOSE 7860
15
 
16
- # Run with Gunicorn
17
- CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "app:app"]
 
1
+ FROM python:3.10-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", "-k", "gthread", "-b", "0.0.0.0:7860", "app:app"]