mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-05 02:41:56 +00:00
* fix(docker): match USE_DDTRACE case-insensitively and route build_from_pip through prod_entrypoint.sh Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * test(docker): run build_from_pip ENTRYPOINT and CMD through the shipped prod_entrypoint.sh Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: yassin <yassin@berri.ai> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
64 lines
2.4 KiB
Text
64 lines
2.4 KiB
Text
ARG UV_IMAGE=ghcr.io/astral-sh/uv:0.10.9@sha256:10902f58a1606787602f303954cea099626a4adb02acbac4c69920fe9d278f82
|
|
FROM $UV_IMAGE AS uvbin
|
|
|
|
FROM python:3.13-slim@sha256:739e7213785e88c0f702dcdc12c0973afcbd606dbf021a589cab77d6b00b579d
|
|
|
|
ARG LITELLM_VERSION=1.83.0
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=uvbin /uv /usr/local/bin/uv
|
|
COPY --from=uvbin /uvx /usr/local/bin/uvx
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends gcc libffi-dev nodejs npm && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
ENV UV_PROJECT_ENVIRONMENT=/app/.venv \
|
|
UV_LINK_MODE=copy \
|
|
PATH="/app/.venv/bin:${PATH}"
|
|
|
|
COPY schema.prisma .
|
|
|
|
# This image is specifically for validating/installing the published PyPI
|
|
# artifact, not the checked-out source tree.
|
|
# Keep the moved proxy-runtime packages explicit until the published PyPI
|
|
# artifact includes that extra; newer releases will simply dedupe these.
|
|
RUN uv venv --python python && \
|
|
uv pip install --python /app/.venv/bin/python \
|
|
"litellm[proxy,proxy-runtime]==${LITELLM_VERSION}" \
|
|
"google-cloud-aiplatform==1.133.0" \
|
|
"google-genai==1.37.0" \
|
|
"anthropic[vertex]==0.84.0" \
|
|
"grpcio==1.78.0" \
|
|
"prometheus-client==0.20.0" \
|
|
"langfuse==2.59.7" \
|
|
"opentelemetry-api==1.28.0" \
|
|
"opentelemetry-sdk==1.28.0" \
|
|
"opentelemetry-exporter-otlp==1.28.0" \
|
|
"ddtrace==4.11.0" \
|
|
"sentry-sdk==2.21.0" \
|
|
"mangum==0.17.0" \
|
|
"azure-ai-contentsafety==1.0.0" \
|
|
"azure-storage-file-datalake==12.20.0" \
|
|
"pypdf==6.7.5" \
|
|
"llm-sandbox==0.3.31" \
|
|
"detect-secrets==1.5.0" \
|
|
"prisma==0.11.0" \
|
|
"openai==2.24.0"
|
|
|
|
RUN HOME=/opt/prisma XDG_CACHE_HOME=/opt/prisma/.cache PRISMA_BINARY_CACHE_DIR=/opt/prisma/binaries \
|
|
npm_config_cache=/root/.npm \
|
|
prisma generate --schema=./schema.prisma && \
|
|
chmod -R a+rX /opt/prisma && \
|
|
python -c "import sys; from prisma.client import BINARY_PATHS; bad = sorted(p for group in BINARY_PATHS.model_dump().values() for p in group.values() if not p.startswith('/opt/prisma/')); sys.exit('prisma engines baked outside /opt/prisma: %r' % bad) if bad else None"
|
|
|
|
ENV PRISMA_BINARY_CACHE_DIR=/opt/prisma/binaries
|
|
|
|
COPY docker/prod_entrypoint.sh /app/docker/prod_entrypoint.sh
|
|
RUN sed -i 's/\r$//' /app/docker/prod_entrypoint.sh && chmod +x /app/docker/prod_entrypoint.sh
|
|
|
|
EXPOSE 4000/tcp
|
|
|
|
ENTRYPOINT ["/app/docker/prod_entrypoint.sh"]
|
|
CMD ["--port", "4000"]
|