mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
Use pre-built UI artifacts in Docker build for faster CI
- Make build_docker_database_image depend on ui_build job - Attach workspace to get pre-built UI from ui_build - Skip build_admin_ui.sh when UI is already built (check for index.html) - Applies to both Dockerfile and Dockerfile.database This gives us faster CI builds (UI builds in parallel with other jobs, Docker just copies the result) while still including the full UI in the Docker image. https://claude.ai/code/session_01UeKmKn4x1ZedSYEvuXg1vz
This commit is contained in:
parent
9cac0471ae
commit
0b699b92c0
3 changed files with 16 additions and 4 deletions
|
|
@ -2523,6 +2523,8 @@ jobs:
|
|||
working_directory: ~/project
|
||||
steps:
|
||||
- checkout
|
||||
- attach_workspace:
|
||||
at: ~/project
|
||||
|
||||
- run:
|
||||
name: Build Docker image
|
||||
|
|
@ -2612,6 +2614,8 @@ workflows:
|
|||
- auth_ui_unit_tests:
|
||||
filters: *main_branches
|
||||
- build_docker_database_image:
|
||||
requires:
|
||||
- ui_build
|
||||
filters: *main_branches
|
||||
- e2e_ui_testing:
|
||||
filters: *main_branches
|
||||
|
|
|
|||
|
|
@ -47,8 +47,12 @@ RUN uv sync --frozen --no-install-project --no-install-workspace --no-default-gr
|
|||
# Copy full source tree
|
||||
COPY . .
|
||||
|
||||
# Build Admin UI before final sync
|
||||
RUN sed -i 's/\r$//' docker/build_admin_ui.sh && chmod +x docker/build_admin_ui.sh && ./docker/build_admin_ui.sh
|
||||
# Build Admin UI before final sync (skip if pre-built UI exists from CI)
|
||||
RUN if [ ! -f litellm/proxy/_experimental/out/index.html ]; then \
|
||||
sed -i 's/\r$//' docker/build_admin_ui.sh && chmod +x docker/build_admin_ui.sh && ./docker/build_admin_ui.sh; \
|
||||
else \
|
||||
echo "Using pre-built Admin UI from CI"; \
|
||||
fi
|
||||
|
||||
# Install project and workspace packages (fast - deps already cached)
|
||||
RUN uv sync --frozen --no-default-groups --no-editable \
|
||||
|
|
|
|||
|
|
@ -46,8 +46,12 @@ RUN uv sync --frozen --no-install-project --no-install-workspace --no-default-gr
|
|||
# Copy full source tree
|
||||
COPY . .
|
||||
|
||||
# Build Admin UI before final sync
|
||||
RUN sed -i 's/\r$//' docker/build_admin_ui.sh && chmod +x docker/build_admin_ui.sh && ./docker/build_admin_ui.sh
|
||||
# Build Admin UI before final sync (skip if pre-built UI exists from CI)
|
||||
RUN if [ ! -f litellm/proxy/_experimental/out/index.html ]; then \
|
||||
sed -i 's/\r$//' docker/build_admin_ui.sh && chmod +x docker/build_admin_ui.sh && ./docker/build_admin_ui.sh; \
|
||||
else \
|
||||
echo "Using pre-built Admin UI from CI"; \
|
||||
fi
|
||||
|
||||
# Install project and workspace packages (fast - deps already cached)
|
||||
RUN uv sync --frozen --no-default-groups --no-editable \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue