test / Dockerfile
mbouhaja's picture
Fix: replace deprecated libgl1-mesa-glx with libgl1 + libglx-mesa0 for Debian Trixie
491b154
raw
history blame contribute delete
563 Bytes
FROM python:3.11-slim
# Dépendances système pour OpenCV headless
RUN apt-get update && apt-get install -y --no-install-recommends \
libglib2.0-0 \
libgl1 \
libglx-mesa0 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Installer les dépendances Python
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copier le code de l'API
COPY app.py .
# Copier le modèle
COPY model/ model/
# Port utilisé par Hugging Face Spaces
EXPOSE 7860
# Lancer l'API
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]