File size: 955 Bytes
1ab5d37
dda717c
 
 
97f0352
dda717c
 
 
 
5cf7734
97f0352
 
dda717c
5cf7734
 
dda717c
29679f6
6c175de
 
29679f6
1f84176
5cf7734
 
 
f4c9647
 
1f84176
 
5cf7734
29679f6
10128d2
f4c9647
 
 
 
6c175de
1f84176
5cf7734
0755a2e
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
32
33
34
35
36
37
38
39
FROM python:3.9-slim

WORKDIR /app

# Install system dependencies
RUN apt-get update && apt-get install -y \
    build-essential \
    && rm -rf /var/lib/apt/lists/*

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

# Copy all files
COPY . .

# Ensure tmp directory exists with proper permissions
RUN mkdir -p /app/tmp
RUN chmod -R 777 /app/tmp
RUN chmod 777 /app

# Create .streamlit config directory
RUN mkdir -p /app/.streamlit
RUN echo "\
[browser]\n\
gatherUsageStats = false\n\
[server]\n\
fileWatcherType = 'none'\n\
" > /app/.streamlit/config.toml
RUN chmod -R 777 /app/.streamlit

# Set environment variables
ENV STREAMLIT_SERVER_PORT=8501
ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0
ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
ENV TMPDIR=/app/tmp

# Set the entry point to the correct file path
ENTRYPOINT ["streamlit", "run", "src/app.py", "--server.address=0.0.0.0", "--server.port=8501"]