pro-passport-api / Dockerfile
MalikSahib1's picture
Update Dockerfile
8e8a92c verified
raw
history blame contribute delete
640 Bytes
FROM python:3.9-slim-bookworm
WORKDIR /app
# System dependencies for OpenCV and MediaPipe
RUN apt-get update && apt-get install -y \
libgl1 \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender-dev \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
RUN mkdir -p suits
COPY . .
# Download rembg model
RUN python -c "from rembg import remove; from PIL import Image; import numpy as np; remove(Image.fromarray(np.zeros((100,100,3), dtype=np.uint8)))"
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]