-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
enable Docker-aware precompiled wheel setup #22106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enable Docker-aware precompiled wheel setup #22106
Conversation
- Enables `VLLM_USE_PRECOMPILED` in Docker builds by exposing it as a build arg - Adds `VLLM_DOCKER_BUILD_CONTEXT` env + Dockerfile arg for safe wheel fallback - Replaces old `repackage_wheel` class with `precompiled_build_ext` to avoid triggering `build_ext` during `pip install -e .` with precompiled binaries - Refactors wheel unpacking to run before `setup()` and patch `package_data` - Fixes truthiness of `VLLM_USE_PRECOMPILED` and new `VLLM_DOCKER_BUILD_CONTEXT` in `envs.py` (e.g. `VLLM_USE_PRECOMPILED=0` no longer evaluates True) Signed-off-by: dougbtv <[email protected]>
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request significantly improves the build process by enabling Docker-aware precompiled wheel setups. The refactoring to handle wheel unpacking before setup()
and replacing repackage_wheel
with precompiled_build_ext
are excellent changes that will improve maintainability and fix issues with editable installs. The fixes for environment variable truthiness are also a welcome improvement for robustness.
I believe ci/pr is failing in this run due to a known issue with quant testing, #19458 |
Signed-off-by: dougbtv <[email protected]> Signed-off-by: jingyu <[email protected]>
Signed-off-by: dougbtv <[email protected]>
Signed-off-by: dougbtv <[email protected]> Signed-off-by: Paul Pak <[email protected]>
Signed-off-by: dougbtv <[email protected]>
Signed-off-by: dougbtv <[email protected]> Signed-off-by: Boyuan Feng <[email protected]>
VLLM_USE_PRECOMPILED
in Docker builds by exposing it as a build argVLLM_DOCKER_BUILD_CONTEXT
env + Dockerfile arg for safe wheel fallbackrepackage_wheel
class withprecompiled_build_ext
to avoid triggeringbuild_ext
duringpip install -e .
with precompiled binariessetup()
and patchpackage_data
VLLM_USE_PRECOMPILED
and newVLLM_DOCKER_BUILD_CONTEXT
inenvs.py
(e.g.VLLM_USE_PRECOMPILED=0
no longer evaluates True)Follow up to: Revert precompile wheel changes #22055
Essential Elements of an Effective PR Description Checklist
supported_models.md
andexamples
for a new model.Purpose
Improve build times in CI by using precompiled wheels in docker build when necessary (and fix up previous ifs-ands-and-buts as described in header)
Test Plan
VLLM_USE_PRECOMPILED
andVLLM_DOCKER_BUILD_CONTEXT
, validate thatTest Result
Testing steps...
Previously in #22025, the Python-only installation test was failing, see this example build
This improves on #22025, which removed the
repackage_wheel
method which implemented abuild_ext
override to use a new methodprecompiled_build_ext
Built test image target and run:
Confirmed docker build contains modified python files, to avoid stale wheel used in previous commits.
Steps:
Modified a file in the local clone...
Built the image:
Ran the image and validated the file is present, as well as expected
.so
binaries from precompiled wheel.