File size: 653 Bytes
6a46c42
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fbb1f9e
6a46c42
 
 
 
 
 
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
26
27
28
29
30

# Use a minimal base image with Python 3.9
FROM python:3.9-slim

# Set working directory
WORKDIR /app

# Copy project files
COPY . .

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

# Create writable directory for Streamlit configs
RUN mkdir -p /app/.streamlit

# Set environment variables
ENV STREAMLIT_HOME="/app/.streamlit"
ENV STREAMLIT_BROWSER_GATHERUSAGESTATS="false"

# Expose Streamlit port
EXPOSE 8501 

# Run the Streamlit app
CMD ["streamlit", "run", "app.py", \
     "--server.port=8501", \
     "--server.address=0.0.0.0", \
     "--server.enableXsrfProtection=false"]