mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
fix(ai-gateway): build the gateway binary in the release image
The Dockerfile asked cargo for --features python-config, which cannot select the litellm-ai-gateway bin target: that target carries required-features = ["server"], so cargo silently built nothing and the later COPY of /build/litellm-rust/target/release/litellm-ai-gateway had no file to copy. Turn the server feature on and name the bin explicitly so a future required-features drift fails at the cargo step instead of silently producing an empty release dir.
This commit is contained in:
parent
cf958c0e6f
commit
6fdd3128d9
1 changed files with 2 additions and 2 deletions
|
|
@ -36,12 +36,12 @@ FROM chef AS builder
|
|||
# whenever only gateway source changes.
|
||||
COPY --from=planner /build/litellm-rust/recipe.json recipe.json
|
||||
RUN cargo chef cook --locked --release \
|
||||
-p litellm-ai-gateway --features python-config \
|
||||
-p litellm-ai-gateway --features server,python-config \
|
||||
--recipe-path recipe.json
|
||||
# Now copy the real sources and build the gateway binary. Deps are already cooked
|
||||
# above, so this step only recompiles the gateway crate.
|
||||
COPY litellm-rust/ .
|
||||
RUN cargo build --locked --release -p litellm-ai-gateway --features python-config
|
||||
RUN cargo build --locked --release -p litellm-ai-gateway --bin litellm-ai-gateway --features server,python-config
|
||||
|
||||
# ---- Runtime ----------------------------------------------------------------
|
||||
# python:3.11-slim-bookworm ships libpython3.11, matching the builder's PyO3
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue