File size: 491 Bytes
522a147
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# 1. Use an official Python image
FROM python:3.9-slim

# 2. Set the working directory inside the container
WORKDIR /app

# 3. Copy only the requirements first (better for speed)
COPY requirements.txt .

# 4. Install the libraries
RUN pip install --no-cache-dir -r requirements.txt

# 5. Copy the rest of your code (app.py and templates folder)
COPY . .

# 6. Tell Hugging Face to use port 7860
ENV PORT=7860
EXPOSE 7860

# 7. Start the Flask app
CMD ["python", "app.py"]