Spaces:
Running
Running
| FROM python:3.12-slim | |
| # Installer les dépendances système minimales | |
| RUN apt-get update && apt-get install -y \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Créer un dossier pour l'app | |
| WORKDIR /app | |
| # Copier les fichiers nécessaires | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY . . | |
| # Exposer le port utilisé par Hugging Face Spaces (important !) | |
| EXPOSE 7860 | |
| # Commande de lancement (FastAPI via Uvicorn) | |
| CMD ["uvicorn", "src.app:app", "--host", "0.0.0.0", "--port", "7860"] | |