Spaces:
Sleeping
Sleeping
| FROM python:3.11-slim | |
| WORKDIR /app | |
| RUN apt-get update && apt-get install -y libgl1 libglib2.0-0 && rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Pre-download models at build time | |
| RUN python -c "from ultralytics import YOLO; YOLO('yolov8n-face.pt')" | |
| RUN python -c "import insightface; a=insightface.app.FaceAnalysis(name='buffalo_l'); a.prepare(ctx_id=-1)" | |
| COPY app/ ./app/ | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "1"] | |