Spaces:
Sleeping
Sleeping
File size: 628 Bytes
22c0953 | 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 | 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"]
|