File size: 492 Bytes
990805c
 
1e88a93
990805c
1e88a93
 
990805c
e2e0a75
1e88a93
990805c
 
 
1e88a93
990805c
 
1e88a93
990805c
 
1e88a93
990805c
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Use an official lightweight Python image
FROM python:3.9-slim

# Set a working directory
WORKDIR /app

# Define a writable cache directory
ENV HF_HOME=/tmp/.cache

# Copy requirements.txt and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy the rest of the application files
COPY . .

# Expose the port Flask will run on
EXPOSE 7860

# Run Flask on the correct host and port
CMD ["flask", "run", "--host", "0.0.0.0", "--port", "7860"]