litellm/docker/task_insights/Dockerfile.light
Joshua Valluru 2457cda73d docs(task-insights): add a labeled local preview path that skips the Rust build
Dockerfile.light and docker-compose.light.yml start from a prebuilt LiteLLM image and copy in the checkout's
Python package, migrations and a dashboard built with a 4 GiB Node heap. BASE_IMAGE has no default because it
must match the checkout's commit, and no published image matches this branch yet. The README says so and records
what the 2026-11-12 local preview actually ran.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 08:58:15 -08:00

29 lines
1.4 KiB
Text

# syntax=docker/dockerfile:1.7
# Local preview only. BASE_IMAGE must be built from the same commit as the build context, because the copied Python
# package calls into the image's compiled extension. See "Local preview without building Rust" in the README.
ARG BASE_IMAGE
ARG UI_BUILD_IMAGE=node:24.19-alpine3.24@sha256:d32cdf619f63fe0471182d08996dd516c6275bb5fd31ae06e55a570bd9e1ad43
FROM --platform=$BUILDPLATFORM $UI_BUILD_IMAGE AS ui-builder
ARG UI_NODE_HEAP_MB=4096
ENV NEXT_TELEMETRY_DISABLED=1 \
npm_config_fund=false \
npm_config_audit=false \
NODE_OPTIONS=--max-old-space-size=${UI_NODE_HEAP_MB}
WORKDIR /ui
COPY ui/litellm-dashboard/package.json ui/litellm-dashboard/package-lock.json ./
COPY ui/litellm-dashboard/vendor/ ./vendor/
RUN --mount=type=cache,target=/root/.npm npm ci --prefer-offline
COPY ui/litellm-dashboard/ ./
RUN npm run build
FROM $BASE_IMAGE
ARG SITE_PACKAGES=/app/.venv/lib/python3.13/site-packages
COPY litellm/ /tmp/overlay/litellm/
COPY litellm-proxy-extras/litellm_proxy_extras/ /tmp/overlay/litellm_proxy_extras/
RUN test -f ${SITE_PACKAGES}/litellm/rust_bridge/_native.abi3.so \
&& cp -a /tmp/overlay/litellm/. ${SITE_PACKAGES}/litellm/ \
&& cp -a /tmp/overlay/litellm_proxy_extras/. ${SITE_PACKAGES}/litellm_proxy_extras/ \
&& rm -rf /tmp/overlay ${SITE_PACKAGES}/litellm/proxy/_experimental/out
COPY --from=ui-builder /ui/out/ ${SITE_PACKAGES}/litellm/proxy/_experimental/out/
COPY schema.prisma /app/schema.prisma