Spaces:
Sleeping
Sleeping
| FROM python:3.11-slim | |
| # Port obligatoire Hugging Face Spaces | |
| ENV PORT=7860 | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| WORKDIR /app | |
| # Dépendances système pour RDKit + rendering | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| libxrender1 \ | |
| libxext6 \ | |
| libgomp1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Installer dépendances Python | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copier tout le projet | |
| COPY . . | |
| # Port Hugging Face | |
| EXPOSE 7860 | |
| # Démarrer FastAPI sur le bon port | |
| CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "7860"] | |