mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-01 02:02:20 +00:00
fix(docker): build UI from source in Dockerfile.non_root instead of copied artefacts
The _experimental/out/ directory was removed from source control in the UI/gateway split (LIT-2815). Dockerfile.non_root was still copying from that path, causing test-server-root-path CI to fail. Replace the cp from the now-absent _experimental/out/ with an inline npm ci + npm run build using the nodejs/npm already installed in the builder stage, then copy from ui/litellm-dashboard/out/ instead. https://claude.ai/code/session_01JVLLUH66aUXF9kxoHcYxWu
This commit is contained in:
parent
e77c41e28d
commit
07f1cd6148
1 changed files with 11 additions and 5 deletions
|
|
@ -55,12 +55,18 @@ COPY . .
|
|||
# Set non-root flag for build time consistency
|
||||
ENV LITELLM_NON_ROOT=true
|
||||
|
||||
# Stage the pre-built Admin UI from the checked-in Next.js static export.
|
||||
# _experimental/out/ is regenerated as part of the release runbook.
|
||||
# Restructure extensionless routes (foo.html -> foo/index.html) to match the layout
|
||||
# proxy_server.py expects, and drop a readiness marker.
|
||||
# Build the Next.js Admin UI from source.
|
||||
# nodejs + npm are already installed in this stage (see apk add above).
|
||||
RUN --mount=type=cache,target=/root/.npm,id=litellm-npm-cache \
|
||||
cd /app/ui/litellm-dashboard && \
|
||||
NEXT_TELEMETRY_DISABLED=1 npm_config_fund=false npm_config_audit=false \
|
||||
npm ci --prefer-offline && \
|
||||
NEXT_TELEMETRY_DISABLED=1 npm run build
|
||||
|
||||
# Stage the built UI and restructure extensionless routes
|
||||
# (foo.html -> foo/index.html) to match the layout proxy_server.py expects.
|
||||
RUN mkdir -p /var/lib/litellm/ui /var/lib/litellm/assets && \
|
||||
cp -r /app/litellm/proxy/_experimental/out/. /var/lib/litellm/ui/ && \
|
||||
cp -r /app/ui/litellm-dashboard/out/. /var/lib/litellm/ui/ && \
|
||||
cp /app/litellm/proxy/logo.jpg /var/lib/litellm/assets/logo.jpg && \
|
||||
( cd /var/lib/litellm/ui && \
|
||||
for html_file in *.html; do \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue