mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-11 08:38:24 +00:00
ci(image-scan): build Rust with a fast ci cargo profile instead of fat-LTO release (#51075)
* ci: speed up image scans with an opt-in Rust profile Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix: separate cached Rust wheels by maturin profile Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
e35eec2bbe
commit
f8a60328b4
5 changed files with 19 additions and 2 deletions
4
.github/workflows/image-scan.yml
vendored
4
.github/workflows/image-scan.yml
vendored
|
|
@ -60,7 +60,7 @@ jobs:
|
|||
persist-credentials: false
|
||||
|
||||
- name: Build the image
|
||||
run: docker build --build-arg LITELLM_RELEASE_TAG=v0.0.0-lens-ci -t "$IMAGE" .
|
||||
run: docker build --build-arg MATURIN_PEP517_ARGS="--profile ci" --build-arg LITELLM_RELEASE_TAG=v0.0.0-lens-ci -t "$IMAGE" .
|
||||
|
||||
- name: Save the image for the verify matrix
|
||||
run: docker save "$IMAGE" | zstd -T0 -3 -o "$RUNNER_TEMP/litellm-image.tar.zst"
|
||||
|
|
@ -73,7 +73,7 @@ jobs:
|
|||
compression-level: 0
|
||||
|
||||
- name: Build the Admin MCP schema image
|
||||
run: docker build --build-arg LITELLM_RELEASE_TAG=v0.0.0-lens-ci --target builder -t "$ADMIN_MCP_SCHEMA_IMAGE" .
|
||||
run: docker build --build-arg MATURIN_PEP517_ARGS="--profile ci" --build-arg LITELLM_RELEASE_TAG=v0.0.0-lens-ci --target builder -t "$ADMIN_MCP_SCHEMA_IMAGE" .
|
||||
|
||||
- name: Save the Admin MCP schema image for the verify matrix
|
||||
run: docker save "$ADMIN_MCP_SCHEMA_IMAGE" | zstd -T0 -3 -o "$RUNNER_TEMP/litellm-admin-mcp-schema.tar.zst"
|
||||
|
|
|
|||
|
|
@ -102,6 +102,7 @@ COPY --from=ui-builder /ui/out/. litellm/proxy/_experimental/out/
|
|||
RUN sed -i 's/\r$//' docker/build_admin_ui.sh && chmod +x docker/build_admin_ui.sh && ./docker/build_admin_ui.sh
|
||||
|
||||
# Install project and workspace packages (fast - deps already cached)
|
||||
ARG MATURIN_PEP517_ARGS=""
|
||||
RUN uv build --package litellm-proxy --wheel --out-dir /wheels
|
||||
RUN uv sync --frozen --no-install-package litellm-proxy --no-default-groups --no-editable \
|
||||
--extra proxy \
|
||||
|
|
|
|||
|
|
@ -161,3 +161,9 @@ panic = "unwind"
|
|||
debug = false
|
||||
incremental = false
|
||||
strip = "symbols"
|
||||
|
||||
[profile.ci]
|
||||
inherits = "release"
|
||||
opt-level = 0
|
||||
lto = false
|
||||
codegen-units = 256
|
||||
|
|
|
|||
|
|
@ -20,3 +20,12 @@ include = [
|
|||
{ path = ".cargo/config.toml", format = "sdist" },
|
||||
{ path = "model_prices_and_context_window.json", format = "sdist" },
|
||||
]
|
||||
|
||||
[tool.uv]
|
||||
cache-keys = [
|
||||
{ file = "pyproject.toml" },
|
||||
{ file = "setup.py" },
|
||||
{ file = "setup.cfg" },
|
||||
{ dir = "src" },
|
||||
{ env = "MATURIN_PEP517_ARGS" },
|
||||
]
|
||||
|
|
|
|||
|
|
@ -368,6 +368,7 @@ exclude = [
|
|||
concurrent-builds = 1
|
||||
cache-keys = [
|
||||
{ file = "pyproject.toml" },
|
||||
{ env = "MATURIN_PEP517_ARGS" },
|
||||
{ file = "rust-toolchain.toml" },
|
||||
{ file = ".cargo/config.toml" },
|
||||
{ file = "litellm-rust/Cargo.lock" },
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue