File size: 439 Bytes
5fd1a86
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Use Python 3.11 (compatible with TF 2.15)
FROM python:3.11-slim

# Set working directory
WORKDIR /app

# Copy all code to container
COPY . /app

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

# Expose HF Spaces default port
EXPOSE 7860

# Set Flask environment variables
ENV FLASK_APP=app.py
ENV FLASK_RUN_HOST=0.0.0.0
ENV FLASK_RUN_PORT=7860

# Run Flask
CMD ["flask", "run"]