Add uv-based build_wheels_linux_v2.yml + torchvision test (replaces conda) - #8336
Draft
atalman wants to merge 3 commits into
Draft
Add uv-based build_wheels_linux_v2.yml + torchvision test (replaces conda)#8336atalman wants to merge 3 commits into
atalman wants to merge 3 commits into
Conversation
V2 of build_wheels_linux.yml that provisions Python and the build toolchain with uv instead of conda/miniforge: - uv installs the requested Python (incl. free-threaded 3.13t/3.14t and pre-releases) and creates a --seed venv activated for all build/test steps. - pytorch_pkg_helpers (BUILD_ENV_FILE) is run via uv. - Build tools cmake/ninja/wheel/build installed via uv pip; system libs are expected from the manylinux builder image / caller pre-script. - Same input/secret/output surface as v1 (drop-in), plus an optional python-version override; no aarch64 miniforge step. Needs CI validation across CPU/CUDA/ROCm/XPU + aarch64 before use.
|
@atalman is attempting to deploy a commit to the Meta Open Source Team on Vercel. A member of the Team first needs to authorize it. |
atalman
force-pushed
the
add-build-wheels-linux-v2-uv
branch
from
July 21, 2026 11:42
ba869ab to
9265993
Compare
…3.12 Exercises build_wheels_linux_v2.yml end-to-end by building pytorch/vision (compiled C++/CUDA extension). Matrix trimmed to Python 3.12 for the initial uv shakedown; expand once green.
…lcheck
`BUILD_VENV: ${{ runner.temp }}/build_venv` used the `runner` context in a
job-level env: block, where it is not available (only github/inputs/matrix/
needs/secrets/strategy/vars are). actionlint flags this as an error and GitHub
rejects the whole reusable workflow at parse time, so the test_build_wheels_
linux_v2 caller produced 0 jobs and failed immediately ("workflow not running").
Set BUILD_VENV from $RUNNER_TEMP in an early step (via $GITHUB_ENV) instead.
Also clear the remaining actionlint/shellcheck findings on the new v2 file so
the Lint check (which lints the diff, i.e. every line of a new file) passes:
- SC1090: add `# shellcheck disable=SC1090` before each `source "$BUILD_ENV_FILE"`
- SC2155: add `# shellcheck disable=SC2155` on `export PYTORCH_VERSION=$(...)`
- SC2086: quote "$pkg" / "$abs_pkg" in the manylinux repair loop
- SC2115: `rm -rf "${RUNNER_TEMP:?}/"*` (also fixes a quoted-glob bug that
removed a literal `*` and cleaned nothing)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a uv-based replacement for the conda build path, plus a test that exercises it:
build_wheels_linux_v2.yml— V2 ofbuild_wheels_linux.ymlthat provisions Python and the build toolchain withuvinstead of conda/miniforge.test_build_wheels_linux_v2.yml— builds torchvision (pytorch/vision) through v2 as an end-to-end shakedown. Matrix trimmed to Python 3.12 for now; expand once green.Draft: build-critical, needs CI validation across variants.
What changed vs v1 (conda)
uvinstalls the requested Python (incl. free-threaded3.13t/3.14t+ pre-releases via python-build-standalone) and creates a--seedvenv activated for every build/test step. Drops the3.14tspecial-case and the aarch64 Miniforge step.pytorch_pkg_helpers(which producesBUILD_ENV_FILE) is run viauv.cmake/ninja/wheel/buildviauv pip; system libs conda used to supply (openssl/libpng/libwebp/pkg-config) come from the manylinux builder image or the caller's pre-script.setup-minicondakept but ignored), plus optionalpython-versionoverride.CONDA_RUNkept as an empty string to keep step bodies diff-minimal.Why torchvision for the test
Compiled C++/CUDA extension (setup-py + pre/post scripts + smoke test) → exercises the uv interpreter, cmake/ninja, torch-dep install, manylinux repair, and smoke test end-to-end. Its
pre_build_script.shinstalls several system deps, so it's a good canary for the "does the image still provide openssl/libpng/…?" question.Not yet validated (why draft)
Open questions
setup-binary-builds-uvaction (like v1 usessetup-binary-builds)?