FROM python:3.11-slim # Deps système pour Chromium RUN apt-get update && apt-get install -y --no-install-recommends \ wget gnupg ca-certificates fonts-liberation libasound2 libatk-bridge2.0-0 \ libatk1.0-0 libcups2 libdbus-1-3 libdrm2 libgbm1 libgtk-3-0 libnspr4 \ libnss3 libx11-xcb1 libxcomposite1 libxdamage1 libxrandr2 xdg-utils \ libxshmfence1 libglu1-mesa libpango-1.0-0 libcairo2 \ && rm -rf /var/lib/apt/lists/* WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt RUN playwright install chromium COPY app.py . # HF Spaces attend le port 7860 EXPOSE 7860 CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]