File size: 513 Bytes
ac8c06d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Image Python officielle
FROM python:3.10-slim

# Empêche Python d'écrire des .pyc et force les logs immédiats
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1

# Répertoire de travail
WORKDIR /app

# Installation des dépendances
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copier le reste de l'application
COPY . .

# Port utilisé par Hugging Face Spaces
EXPOSE 7860

# Lancement de l'application Flask avec Gunicorn
CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]