File size: 596 Bytes
35f1b29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Use a minimal base image with Python 3.9 installed
FROM python:3.9-slim

# Set the working directory inside the container
WORKDIR /app

# Copy dependency files first (for caching layers)
COPY requirements.txt .

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

# Copy rest of the project files
COPY . .

# Streamlit requires environment variable for Hugging Face Spaces
ENV PORT=7860

# Expose the Hugging Face default port
EXPOSE $PORT

# Run Streamlit on Hugging Face default port
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]