File size: 681 Bytes
6a2e906
 
0259c99
 
 
6a2e906
0259c99
 
 
 
 
 
6a2e906
 
0259c99
6a2e906
 
0259c99
6a2e906
 
0259c99
 
6a2e906
 
 
 
 
 
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
# 1. Switch to 3.11-slim (Better wheel support)
FROM python:3.11-slim

WORKDIR /app

# 2. Install essentials
RUN apt-get update && apt-get install -y \
    build-essential \
    curl \
    git \
    && rm -rf /var/lib/apt/lists/*

# 3. Copy requirements
COPY requirements.txt .

# 4. Upgrade pip first (This helps it find the right wheels)
RUN pip install --upgrade pip

# 5. Install Python libraries
RUN pip install --no-cache-dir -r requirements.txt


# 7. Copy all files
COPY . .

# 8. Ports and Run
EXPOSE 7860
CMD ["streamlit", "run", "src/streamlit_app.py", "--server.port=7860", "--server.address=0.0.0.0", "--server.enableCORS=false", "--server.enableXsrfProtection=false"]