Skip to content

Conversation

@dougbtv
Copy link
Contributor

@dougbtv dougbtv commented Jul 30, 2025

Fixes up use of precompiled wheels so only compiled CUDA kernel .so files are extracted and used during the build. Prevents .py file pollution from the wheel, while still enabling downstream layers in the Dockerfile to install the wheel (for deps like torch).

Follow up to PR #20943

Re-used prior extraction logic for .so's, and does so in such a manner that:

  • Extracts .so files to /workspace/dist/ in Docker context
  • Copies .whl to /workspace/dist/ for uv pip install
  • Keeps behavior consistent for local development (extracts only .sos to ./vllm)

Big thanks to Cyrus @DarkLight1337 for identifying this.

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

Fix how CI builds using pre-compiled wheels work, which currently is not reliable without this change.

Example, from Cyrus:

The error shouldn't exist in the latest commit of https://github.com/vllm-project/vllm/pull/21933 because I literally removed it in that commit

Log: https://buildkite.com/vllm/fastcheck/builds/32978/steps/canvas?jid=01985b82-3ec5-47ef-8441-78c102a536c1

Test Plan

Test Result

(Optional) Documentation Update

@mergify mergify bot added the ci/build label Jul 30, 2025
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 logic for handling pre-compiled wheels to extract only the compiled .so files, preventing Python file pollution, while still making the original wheel available for subsequent steps in a Docker build. The changes look good and align with the stated objectives. The code is now cleaner and more robust in how it extracts files from the wheel. There is one point of feedback regarding a hardcoded architecture tag, which could impact future maintainability and portability.

setup.py Outdated
Comment on lines +432 to +439
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The architecture tag cp38-abi3-manylinux1_x86_64 is hardcoded. This makes the build process less flexible. Consider determining the platform tag dynamically to improve maintainability and support other architectures in the future.

@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.

🚀

…tracted

Fixes up use of precompiled wheels so only compiled CUDA kernel `.so` files are extracted and used during the build. Prevents `.py` file pollution from the wheel, while still enabling downstream layers in the Dockerfile to install the wheel (for deps like `torch`).

Follow up to PR vllm-project#20943

Re-used prior extraction logic for .so's, and does so in such a manner that:

- Extracts `.so` files to `/workspace/dist/` in Docker context
- Copies `.whl` to `/workspace/dist/` for `uv pip install`
- Keeps behavior consistent for local development (extracts only `.so`s to `./vllm`)

Big thanks to Cyrus @DarkLight1337 for identifying this.
@dougbtv dougbtv force-pushed the docker-wheel-so-only branch from 1223a5d to 3c7a2eb Compare July 30, 2025 18:41
@simon-mo simon-mo merged commit b9b753e into vllm-project:main Jul 30, 2025
9 of 14 checks passed
@noooop
Copy link
Collaborator

noooop commented Jul 31, 2025

@dougbtv

Compare #21747 with #21929,

Merging main into #21747 will cause the tests to fail.

this pr did not solve this problem. (If this issue is caused by VLLM_USE_PRECOMPILED

dougbtv added a commit to dougbtv/vllm that referenced this pull request 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>
simon-mo added a commit to simon-mo/vllm that referenced this pull request Aug 1, 2025
x22x22 pushed a commit to x22x22/vllm that referenced this pull request Aug 5, 2025
jinzhen-lin pushed a commit to jinzhen-lin/vllm that referenced this pull request Aug 9, 2025
noamgat pushed a commit to noamgat/vllm that referenced this pull request Aug 9, 2025
paulpak58 pushed a commit to paulpak58/vllm that referenced this pull request Aug 13, 2025
diegocastanibm pushed a commit to diegocastanibm/vllm that referenced this pull request Aug 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants