File size: 817 Bytes
3d41682
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# Use BuildKit for better caching: DOCKER_BUILDKIT=1
FROM python:3.10-slim

ENV PYTHONUNBUFFERED=1

WORKDIR /home/user/app

# System dependencies
RUN apt-get update && \
    apt-get install -y --no-install-recommends git git-lfs ffmpeg libsm6 libxext6 libgl1-mesa-glx && \
    rm -rf /var/lib/apt/lists/* && \
    git lfs install

# Upgrade pip
RUN pip install --no-cache-dir pip setuptools

# Copy requirements and install (cached unless requirements.txt changes)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy rest of source
COPY . .

# Expose default Streamlit port (change if using Flask)
EXPOSE 8501

# Default command: run Streamlit. If using Flask instead, adjust to ["python", "app.py"]
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.enableCORS=false"]