reachy-vision-api / Dockerfile
Chris
feat: add YOLOv8 object detection API
00340de unverified
raw
history blame contribute delete
638 Bytes
FROM python:3.12-slim
ENV PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
UV_SYSTEM_PYTHON=1
WORKDIR /app
# Dépendances système nécessaires à YOLO / OpenCV
RUN apt-get update && apt-get install -y \
curl \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Installer uv
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
ENV PATH="/root/.local/bin:$PATH"
# Copier les fichiers de dépendances
COPY pyproject.toml uv.lock ./
# Installer les deps (prod only)
RUN uv sync --no-dev
# Copier le code
COPY app.py .
EXPOSE 7860
CMD ["uv", "run", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]