FROM python:3.11-slim AS model | |
WORKDIR /app | |
RUN apt update && apt install -y libgl1-mesa-glx libglib2.0-0 && apt clean | |
RUN python -m pip install uv | |
COPY pyproject.toml . | |
RUN python -m uv pip install -r pyproject.toml | |
COPY models.py . | |
RUN python models.py | |
FROM nvcr.io/nvidia/tritonserver:24.05-py3 AS runtime | |
COPY --from=model --chmod=777 /app/models /models | |
CMD ["tritonserver", "--model-repository=/models"] | |