File size: 359 Bytes
23b23ce
 
 
 
 
 
 
 
 
 
 
 
b4b0967
23b23ce
 
b4b0967
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
FROM python:3.10-slim

WORKDIR /app

# Copy and install dependencies first (better Docker cache)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy backend code
COPY app.py .

# HuggingFace Spaces requires port 7860
EXPOSE 7860

# Run Flask via gunicorn
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--timeout", "120", "app:app"]