File size: 729 Bytes
ae71c39
0876664
 
 
ae71c39
 
 
 
 
 
0876664
ae71c39
 
 
0876664
 
ae71c39
 
 
0876664
ae71c39
 
0876664
ae71c39
 
 
0876664
ae71c39
 
0876664
ae71c39
 
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
FROM python:3.12-slim

WORKDIR /app

# Empêcher analytics et erreurs de cache
ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
ENV STREAMLIT_HOME=/tmp/.streamlit
ENV HF_HOME=/tmp/huggingface

# Installer dépendances système
RUN apt-get update && apt-get install -y \
    libgl1 \
    libglib2.0-0 \
    ffmpeg \
    && rm -rf /var/lib/apt/lists/*

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

# Copier code et modèle
COPY . .

# Config streamlit
RUN mkdir -p /tmp/.streamlit
COPY .streamlit/config.toml /tmp/.streamlit/config.toml

# Exposer port
EXPOSE 8501

# Lancer Streamlit
ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]