Repository navigation
[Build] Install vllm-rs as a native command - #57611
Draft
alec-flowers wants to merge 1 commit into
Draft
alec-flowers wants to merge 1 commit into
alec-flowers wants to merge 1 commit into
Conversation
Co-authored-by: Codex <noreply@openai.com> Signed-off-by: Alec Flowers <aflowers@nvidia.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Installing a vLLM wheel currently places
vllm-rsinside the Python package, so the native command cannot be invoked by name. Package it withRustBinso installers place it in the environment's scripts directory, including/usr/local/binin the standard container andbinin virtual environments.Draft alternative to #57606, which adds a symlink only to the CUDA serving image. This changes wheel packaging for all installers so
vllm-rsdirectly executes the native binary. The existingvllm servePython launcher, includingVLLM_USE_RUST_FRONTEND=1 vllm serve, remains supported. The container's defaultvllm serveentrypoint is unchanged. These are alternative approaches to compare, not changes intended to merge together. Searched open PRs forRustBin,"vllm-rs" "packaging", and"vllm-rs" "console"; no other PR implements this packaging change. #51503 concerns a separate standalone renderer image.Implementation
RustBin. Keepbuild_rust.shoutput atvllm/vllm-rsby selecting that scripts build directory, preserving existing Docker staging paths.vllm.vllm/vllm-rsand*.data/scripts/vllm-rswhen extracting precompiled wheels.egg-infowithout an executable so native editable installs work from the checkout. No PATH search is needed.Four files changed; no Dockerfile or documentation changes. AI assistance was used to prepare and review this prototype.
Validation
Passed on Linux x86_64:
.venv/bin/python -m pytest --noconftest tests/test_envs.py -k 'rust or precompiled' -q .venv/bin/pre-commit run --files setup.py tools/build_rust.py vllm/envs.py tests/test_envs.py git diff --checkThe focused pytest run passed all four cases. The new parameterized regression covers executable discovery with source metadata shadowing the installed distribution, and preference for an in-place source build.
Packaging checks used the actual
setup.pywithVLLM_TARGET_DEVICE=empty, prebuilt Rust artifacts, andCARGOset to a nonexistent path:*.data/scripts/vllm-rsand retain the Rust parser extension.uv pip install --no-depsinstalls an ELF executable;vllm-rs --helpand automatic discovery pass. Uninstall removes the command.uv pip install --no-deps --no-build-isolation -e .withVLLM_PRECOMPILED_WHEEL_LOCATIONsucceeds using both old and new wheel layouts. Discovery also passes from the checkout after removing the source-local binary.v0.29.0, image digestsha256:082ca6f035279109041ffd3fe0695cb568b29bc580b35c4f297a66a08b216c1b) and nightly (0.29.1rc1.dev347+gdee37d891, image digestsha256:b88541ab10490f6ee43d2e352edcfcb4b4e0e6b1fdd26ed427c89d73e3fa6a7b).uv pip install --system --no-deps --no-index./usr/local/bin/vllm-rsis a native executable, not a symlink.docker run --entrypoint vllm-rs ... --helppassed as root and as UID 2000.Full vLLM Rust/CUDA compilation and model inference were not run. The Cargo fixture checks packaging destinations, not full frontend compilation. Model evaluation is not applicable to this packaging-only change.