- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 10.9k
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 <dosmith@redhat.com>
| 👋 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 <dosmith@redhat.com> Signed-off-by: Paul Pak <paulpak58@gmail.com>
Signed-off-by: dougbtv <dosmith@redhat.com> Signed-off-by: Diego-Castan <diego.castan@ibm.com>
Signed-off-by: dougbtv <dosmith@redhat.com>
Signed-off-by: dougbtv <dosmith@redhat.com>
Signed-off-by: dougbtv <dosmith@redhat.com> Signed-off-by: Xiao Yu <xiao.yu@amd.com>
Signed-off-by: dougbtv <dosmith@redhat.com>
VLLM_USE_PRECOMPILEDin Docker builds by exposing it as a build argVLLM_DOCKER_BUILD_CONTEXTenv + Dockerfile arg for safe wheel fallbackrepackage_wheelclass withprecompiled_build_extto avoid triggeringbuild_extduringpip install -e .with precompiled binariessetup()and patchpackage_dataVLLM_USE_PRECOMPILEDand newVLLM_DOCKER_BUILD_CONTEXTinenvs.py(e.g.VLLM_USE_PRECOMPILED=0no longer evaluates True)Follow up to: Revert precompile wheel changes #22055
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor 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_PRECOMPILEDandVLLM_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_wheelmethod which implemented abuild_extoverride to use a new methodprecompiled_build_extBuilt 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
.sobinaries from precompiled wheel.