File size: 725 Bytes
79f73d6
 
 
 
 
 
 
 
aebf099
 
79f73d6
 
aebf099
79f73d6
 
aebf099
79f73d6
 
 
aebf099
 
79f73d6
aebf099
 
c914c80
aebf099
79f73d6
aebf099
 
 
 
 
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
FROM python:3.13.5-slim

WORKDIR /app

RUN apt-get update && apt-get install -y \
    build-essential \
    curl \
    git \
    # Ajout de 'bash' si non inclus dans slim, nécessaire pour run.sh
    bash \
    && rm -rf /var/lib/apt/lists/*

# Copie des fichiers
COPY requirements.txt ./
COPY src/ ./src/
COPY run.sh ./ 

RUN pip3 install -r requirements.txt

# Rendre le script exécutable
RUN chmod +x run.sh

# Exposer les deux ports (Hugging Face gère les redirections)
EXPOSE 7860
EXPOSE 7861
EXPOSE 8000

# Vérification de santé sur le port Streamlit principal (7860)
HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health

# Point d'entrée : Exécuter le script run.sh
ENTRYPOINT ["/bin/bash", "run.sh"]