File size: 748 Bytes
675818e
39d02ab
 
 
91856f2
 
 
39d02ab
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91856f2
39d02ab
 
 
 
a0d4d99
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
FROM python:3.9-slim

# System deps (ffmpeg for video I/O)
RUN apt-get update && apt-get install -y --no-install-recommends \
    build-essential \
    curl \
    git \
    ffmpeg \
 && rm -rf /var/lib/apt/lists/*

WORKDIR /app
ENV HOME=/app

# Leverage build cache for Python deps
COPY requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt

# App code
COPY . .

# Streamlit folder (if your app needs it)
RUN mkdir -p /app/.streamlit && chmod -R 777 /app/.streamlit

EXPOSE 8501

HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
  CMD curl --fail http://localhost:8501/_stcore/health || exit 1

ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"]