Skip to content

[CI/CD] build wheel in manylinux container#174

Open
jikunshang wants to merge 4 commits intomainfrom
kunshang/build-manylinux
Open

[CI/CD] build wheel in manylinux container#174
jikunshang wants to merge 4 commits intomainfrom
kunshang/build-manylinux

Conversation

@jikunshang
Copy link
Collaborator

@jikunshang jikunshang commented Mar 5, 2026

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.

PLEASE FILL IN THE PR DESCRIPTION HERE ENSURING ALL CHECKLIST ITEMS ABOVE HAVE BEEN CONSIDERED.

Purpose

use pytorch build wheel docker pytorch/manylinux2_28-builder:xpu-main
https://github.com/pytorch/pytorch/blob/main/.ci/manywheel/build_xpu.sh
igc in this docker image is 2.20.5

Test Plan

CI job pass
https://github.com/vllm-project/vllm-xpu-kernels/actions/runs/22673444106

Test Result

(Optional) Documentation Update

BEFORE SUBMITTING, PLEASE READ https://docs.vllm.ai/en/latest/contributing (anything written below this line will be removed by GitHub Actions)

jikunshang and others added 3 commits March 4, 2026 01:50
Signed-off-by: Kunshang Ji <kunshang.ji@intel.com>
Signed-off-by: Kunshang Ji <kunshang.ji@intel.com>
Signed-off-by: Kunshang Ji <jikunshang95@gmail.com>
Copilot AI review requested due to automatic review settings March 5, 2026 04:35
@jikunshang jikunshang changed the title build wheel in manylinux container [CD] build wheel in manylinux container Mar 5, 2026
@jikunshang jikunshang changed the title [CD] build wheel in manylinux container [CI/CD] build wheel in manylinux container Mar 5, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the per-commit wheel build workflow to run inside PyTorch’s manylinux2_28 XPU builder container, aiming to produce wheels in an environment closer to PyTorch’s official manywheel build setup.

Changes:

  • Switch the wheel build job container image to pytorch/manylinux2_28-builder:xpu-main.
  • Source Intel oneAPI environment before building, and install build requirements with pip.
  • Post-process the produced wheel filename to use a manylinux_2_28_x86_64 platform tag.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

github.event.workflow_run.event == 'push')
container:
image: localhost:5000/xpu-kernel-ci-image:latest
image: pytorch/manylinux2_28-builder:xpu-main
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

The workflow uses a moving container tag (pytorch/manylinux2_28-builder:xpu-main). This makes builds non-reproducible and can break unexpectedly when the image changes. Consider pinning the image by digest (or a versioned tag) so the wheel build environment is stable over time.

Suggested change
image: pytorch/manylinux2_28-builder:xpu-main
image: pytorch/manylinux2_28-builder@sha256:1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef

Copilot uses AI. Check for mistakes.
Comment on lines 47 to +48
python3 setup.py bdist_wheel --dist-dir=dist --py-limited-api=cp38
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/conda/lib/python3.11/site-packages/torch/lib/
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

LD_LIBRARY_PATH is exported after setup.py bdist_wheel runs, so it won’t affect compilation/linking during the wheel build. If this path is required for building (e.g., to find Torch shared libs), export it before invoking python3 setup.py ...; otherwise this line is dead code and should be removed to avoid confusion.

Suggested change
python3 setup.py bdist_wheel --dist-dir=dist --py-limited-api=cp38
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/conda/lib/python3.11/site-packages/torch/lib/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/conda/lib/python3.11/site-packages/torch/lib/
python3 setup.py bdist_wheel --dist-dir=dist --py-limited-api=cp38

Copilot uses AI. Check for mistakes.
Comment on lines 47 to +49
python3 setup.py bdist_wheel --dist-dir=dist --py-limited-api=cp38
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/conda/lib/python3.11/site-packages/torch/lib/
for f in dist/*-linux_x86_64.whl; do mv "$f" "${f/linux_x86_64/manylinux_2_28_x86_64}"; done
Copy link

Copilot AI Mar 5, 2026

Choose a reason for hiding this comment

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

Renaming the wheel filename from linux_x86_64 to manylinux_2_28_x86_64 can mislabel the wheel without actually ensuring manylinux compliance (e.g., external shared library dependencies). Instead of mv, use a proper manylinux repair step (typically auditwheel repair, or build with the correct --plat-name and verify policy compliance) so the tag accurately reflects the wheel’s ABI/packaging.

Suggested change
python3 setup.py bdist_wheel --dist-dir=dist --py-limited-api=cp38
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/conda/lib/python3.11/site-packages/torch/lib/
for f in dist/*-linux_x86_64.whl; do mv "$f" "${f/linux_x86_64/manylinux_2_28_x86_64}"; done
pip install auditwheel
python3 setup.py bdist_wheel --dist-dir=dist --py-limited-api=cp38
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/conda/lib/python3.11/site-packages/torch/lib/
auditwheel repair --plat manylinux_2_28_x86_64 -w dist dist/*-linux_x86_64.whl

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants