File size: 496 Bytes
1579300
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0389e6d
 
1579300
 
 
 
0389e6d
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Use a lightweight Python base image
FROM python:3.11-slim

# Set working directory
WORKDIR /app

# Copy requirements file first (for efficient Docker caching)
COPY requirements.txt .

# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Copy the rest of the application files
COPY . .

# Expose port 7860 (Hugging Face default)
EXPOSE 7860

# Set environment variables
ENV PYTHONUNBUFFERED=1

# Run the Flask app on 0.0.0.0:7860 (required by HF)
CMD ["python", "app.py"]