File size: 646 Bytes
f8f4519
 
57ead86
f8f4519
 
57ead86
b757c63
 
 
 
f8f4519
57ead86
b757c63
57ead86
b757c63
 
 
 
 
57ead86
b757c63
57ead86
 
b757c63
f8f4519
57ead86
f8f4519
 
57ead86
f8f4519
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
31
FROM python:3.10-slim

# Set working directory
WORKDIR /app

# Copy everything
COPY . /app

# Install requirements
RUN pip install --upgrade pip && pip install -r requirements.txt

# Create .streamlit config with safe permissions
RUN mkdir -p /app/.streamlit && \
    chmod -R 777 /app/.streamlit && \
    echo "\
[server]\n\
headless = true\n\
port = 7860\n\
enableCORS = false\n\
enableXsrfProtection = false\n\
\n\
[browser]\n\
gatherUsageStats = false\n\
" > /app/.streamlit/config.toml

# Expose the port Streamlit runs on
EXPOSE 7860

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