anomaly-detection-api / Dockerfile
khvlil69's picture
Fix OpenCV deps: use libgl1 for Debian Trixie
3ae26c2
Raw History Blame Contribute Delete
496 Bytes
# Hugging Face Spaces: must listen on port 7860
FROM python:3.10-slim
WORKDIR /app
# OpenCV headless: libgl1-mesa-glx was replaced by libgl1 in Debian Bookworm+
RUN apt-get update && apt-get install -y --no-install-recommends \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
# Spaces expose port 7860
EXPOSE 7860
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--timeout", "120", "app:app"]