front-back-view-api / Dockerfile
CooLLegend's picture
fix(docker): add missing libegl1 and libgles2 dependencies to Dockerfile
e1a46e9
Raw
History Blame Contribute Delete
690 Bytes
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"]