speedo-vision-api / Dockerfile
Hadilc's picture
Update Dockerfile
3aca1f8 verified
raw
history blame contribute delete
604 Bytes
FROM python:3.10-slim
WORKDIR /app
# Install system libraries required by opencv
RUN apt-get update && apt-get install -y \
libxcb1 \
libglib2.0-0 \
libgl1 \
&& rm -rf /var/lib/apt/lists/*
# Install headless opencv first (no display needed on a server)
RUN pip install --no-cache-dir opencv-python-headless
# Install the rest of the dependencies
RUN pip install --no-cache-dir \
fastapi \
uvicorn \
python-multipart \
ultralytics \
huggingface_hub \
pillow
COPY app.py .
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]