File size: 1,001 Bytes
b4d3ea9
615ce5a
36d35bb
5d5b3c4
b4d3ea9
 
 
 
 
 
 
 
 
5d5b3c4
 
b4d3ea9
8b46ceb
615ce5a
36d35bb
5d5b3c4
b4d3ea9
5d5b3c4
 
b4d3ea9
36d35bb
b4d3ea9
 
 
 
4aabc86
5d5b3c4
615ce5a
36d35bb
5d5b3c4
 
 
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
# syntax = docker/dockerfile:1.4
FROM python:3.12-slim

# Installe les dépendances système nécessaires pour Pillow/Matplotlib + compilation si besoin
RUN apt-get update && apt-get install -y --no-install-recommends \
    gcc \
    g++ \
    libjpeg62-turbo-dev \
    zlib1g-dev \
    libpng-dev \
    libfreetype6-dev \
    libopenjp2-7-dev \
    libtiff5-dev \
    curl \
    git \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app

# Copie requirements en premier (meilleur cache)
COPY requirements.txt .

# Installe tout (sans cache pour réduire la taille finale)
RUN pip install --no-cache-dir -r requirements.txt

# Copie le code et les données
COPY app.py .
COPY faker_text.csv .
COPY numeric_only.csv .

# Port + commande obligatoire pour HF Spaces
EXPOSE 8501

HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1

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