File size: 495 Bytes
ef2e6ab
 
 
 
 
 
 
e3dffa3
ef2e6ab
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
FROM python:3.9-slim

# Set working directory
WORKDIR /app

# Copy requirements and app code from build context
# We copy requirements first to leverage layer caching
COPY . .

# Upgrade pip and install dependencies
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt

# Expose the port (matches app.run host/port)
EXPOSE 7860

# Start with gunicorn; 'app:app' expects app.py to define 'app = Flask(...)'
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "app:app"]