Skip to content

Conversation

@dougbtv
Copy link
Contributor

@dougbtv dougbtv commented Jul 31, 2025

This refactors the logic for handling VLLM_USE_PRECOMPILED to ensure that Docker builds extract only the required .so files and properly modify the package_data before setup()

  • Removes errant precompiled wheel copy that was copying old code
    • e.g. not code from the current checkout.
  • Moves precompiled wheel extraction logic into a utility class
  • Applies package_data patch before calling setup()
  • Now skips build_ext when precompiled is enabled
  • Supports fallback to nightly wheel if latest commit isn't available

Follow-up to PR #21964 as part of improving build times for CI.

Essential Elements of an Effective PR Description Checklist

  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • [-] (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.

Purpose

Fixes errant wheel copy and improves the flow so that package_data is computed prior to setup.

Test Plan

Build and inspect on local work station.

Test Result

Previously, old code would be overwritten by the copied wheel.

Locally built and inspected file contents.

Realized that the package_data list was compiled too late, refactored the flow to account for it, doing everything up front before setup()

Wound up fixing it up and inspecting final build like so to look for a modification I put in place:

doug@stimsonmt:~/vllm$ docker build --file docker/Dockerfile --build-arg max_jobs=16 --build-arg VLLM_USE_PRECOMPILED=1 --build-arg VLLM_DOCKER_BUILD_CONTEXT=1 --build-arg USE_FLASHINFER_PREBUILT_WHEEL=true --tag dougbtv/vllm:checkbuildfinal . | tee checkbuild.final.log.out
doug@stimsonmt:~/vllm$ docker run -it --rm --entrypoint=/bin/bash localhost/dougbtv/vllm:checkbuildfinal
root@35a10e831010:/vllm-workspace# cat /usr/local/lib/python3.12/dist-packages/vllm/config.py | grep -i bang
                "memory footprint and boosts the performance. !bang"

Found my marker in a modified file, e.g. !bang as seen in print output above.

(Optional) Documentation Update

@github-actions
Copy link

👋 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 fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

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 ready label to the PR or enable auto-merge.

🚀

@mergify mergify bot added the ci/build label Jul 31, 2025
@dougbtv dougbtv force-pushed the precompiled-wheel-setup-flow branch from 5747076 to a47c9a9 Compare July 31, 2025 16:04
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 refactors the precompiled wheel handling for Docker builds, which is a good improvement for maintainability. The core logic is moved into a utility class, and the extraction process now happens before the main setup() call. I've identified a critical bug that would cause the setup script to crash and a high-severity resource leak from uncleaned temporary directories. Addressing these will make the build process more robust.

@dougbtv dougbtv force-pushed the precompiled-wheel-setup-flow branch from a47c9a9 to a8518a8 Compare July 31, 2025 16:08
@DarkLight1337 DarkLight1337 enabled auto-merge (squash) July 31, 2025 16:15
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Jul 31, 2025
This refactors the logic for handling `VLLM_USE_PRECOMPILED` to ensure
that Docker builds extract only the required .so files and properly
modify the package_data before setup()

- Removes errant precompiled wheel copy that was copying old code
  - e.g. not code from the current checkout.
- Moves precompiled wheel extraction logic into a utility class
- Applies package_data patch before calling setup()
- Now skips build_ext when precompiled is enabled
- Supports fallback to nightly wheel if latest commit isn't available

Follow-up to PR vllm-project#21964 as part of improving build times for CI.

Signed-off-by: dougbtv <dosmith@redhat.com>
auto-merge was automatically disabled July 31, 2025 16:20

Head branch was pushed to by a user without write access

@dougbtv dougbtv force-pushed the precompiled-wheel-setup-flow branch from a8518a8 to e7c9c50 Compare July 31, 2025 16:20
@simon-mo simon-mo merged commit 58bb902 into vllm-project:main Jul 31, 2025
34 of 42 checks passed
@mgoin
Copy link
Member

mgoin commented Aug 1, 2025

@dougbtv @DarkLight1337 @simon-mo I think this broke the Python-only Installation Test https://buildkite.com/vllm/ci/builds/25598/steps/canvas?sid=01986167-695e-4a0e-b2a5-dd8aef0cb236

kebe7jun added a commit to kebe7jun/vllm that referenced this pull request Aug 1, 2025
simon-mo added a commit to simon-mo/vllm that referenced this pull request Aug 1, 2025
npanpaliya pushed a commit to odh-on-pz/vllm-upstream that referenced this pull request Aug 6, 2025
jinzhen-lin pushed a commit to jinzhen-lin/vllm that referenced this pull request Aug 9, 2025
…roject#22025)

Signed-off-by: dougbtv <dosmith@redhat.com>
Signed-off-by: Jinzhen Lin <linjinzhen@hotmail.com>
noamgat pushed a commit to noamgat/vllm that referenced this pull request Aug 9, 2025
…roject#22025)

Signed-off-by: dougbtv <dosmith@redhat.com>
Signed-off-by: Noam Gat <noamgat@gmail.com>
paulpak58 pushed a commit to paulpak58/vllm that referenced this pull request Aug 13, 2025
…roject#22025)

Signed-off-by: dougbtv <dosmith@redhat.com>
Signed-off-by: Paul Pak <paulpak58@gmail.com>
diegocastanibm pushed a commit to diegocastanibm/vllm that referenced this pull request Aug 15, 2025
…roject#22025)

Signed-off-by: dougbtv <dosmith@redhat.com>
Signed-off-by: Diego-Castan <diego.castan@ibm.com>
epwalsh pushed a commit to epwalsh/vllm that referenced this pull request Aug 28, 2025
zhewenl pushed a commit to zhewenl/vllm that referenced this pull request Aug 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/build ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants