Spaces:
Sleeping
Sleeping
| FROM python:3.11-slim | |
| WORKDIR /app | |
| RUN apt-get update && \ | |
| apt-get install -y --no-install-recommends \ | |
| libglib2.0-0 \ | |
| libxcb1 \ | |
| libgl1 \ | |
| libegl1 \ | |
| libgles2 && \ | |
| rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY . . | |
| # Download the MediaPipe face landmarker model at build time | |
| RUN python -c "\ | |
| import urllib.request; \ | |
| urllib.request.urlretrieve( \ | |
| 'https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/latest/face_landmarker.task', \ | |
| 'face_landmarker_v2.task' \ | |
| )" | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |