Skip to content

[CD] [BE] Trim build_env_setup.py OS-package install to zip+openssl - #183320

Closed
atalman wants to merge 1 commit into
pytorch:mainfrom
atalman:trim_build_env_setup_v3
Closed

atalman wants to merge 1 commit into
pytorch:mainfrom
atalman:trim_build_env_setup_v3

Conversation

@atalman

@atalman atalman commented May 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #182409, addressing the review observation that the new build_env_setup.py duplicated the OS-package list already baked into the manywheel builder image (.ci/docker/manywheel/Dockerfile_2_28), with no CI use case for the duplication. The drift risk between the Dockerfile and the Python script and the broadened wheel-build-time supply-chain surface (fresh yum/apt fetches vs. the image's frozen baseline) provide no benefit on the standard CI path.

This PR restores the legacy "trust the image" contract for the OS-package list only:

  • install_os_packages now installs only zip + openssl on RHEL/Ubuntu (the original build_common.sh set). All other yum/apt packages come from Dockerfile_2_28 at image-build time.
  • The nvidia-apt list mangling on Ubuntu is removed (no longer needed once the install set is trimmed).

The CUDA + MAGMA + MKL bootstrap paths (install_cuda_toolkit, the install_magma.sh fallback in setup_cuda, and the install_mkl.sh fallback in main()) are kept so the script remains usable on a lean manylinux base when those toolkits aren't already staged.

Net diff: 1 file, +15 / -42.

Authored with Claude.

Test plan

  • Nightly manywheel CUDA / CPU / aarch64 build jobs (Linux) succeed.
  • No regressions from the trimmed OS-package install on Dockerfile_2_28.

Addresses review feedback on pytorch#182409: the new build_env_setup.py
duplicated the OS-package list already baked into the manywheel builder
image (.ci/docker/manywheel/Dockerfile_2_28), with no CI use case for
the duplication. The drift risk between the Dockerfile and the Python
script and the broadened wheel-build-time supply-chain surface (fresh
yum/apt fetches vs. the image's frozen baseline) provide no benefit on
the standard CI path.

This change restores the legacy "trust the image" contract for the
OS-package list:

  * install_os_packages now installs only zip + openssl on RHEL/Ubuntu
    (the original build_common.sh set). All other yum/apt packages
    come from Dockerfile_2_28 at image-build time.
  * The nvidia-apt list mangling on Ubuntu is removed (no longer
    needed once the install set is trimmed).

The CUDA + MAGMA + MKL bootstrap paths (install_cuda_toolkit, the
install_magma.sh fallback in setup_cuda, and the install_mkl.sh
fallback in main) are kept so the script remains usable on a lean
manylinux base when those toolkits aren't already staged.

Authored with Claude.
@atalman
atalman requested a review from a team as a code owner May 11, 2026 15:00
@pytorch-bot

pytorch-bot Bot commented May 11, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/183320

Note: Links to docs will display an error until the docs builds have been completed.

⏳ No Failures, 14 Pending

As of commit a2650c1 with merge base 3d5307b (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot Bot added the topic: not user facing topic category label May 11, 2026
@atalman atalman added the ciflow/binaries Trigger all binary build and upload jobs on the PR label May 11, 2026
@atalman atalman changed the title [CD] Trim build_env_setup.py OS-package install to legacy zip+openssl [CD] [BE] Trim build_env_setup.py OS-package install to legacy zip+openssl May 11, 2026
@atalman atalman changed the title [CD] [BE] Trim build_env_setup.py OS-package install to legacy zip+openssl [CD] [BE] Trim build_env_setup.py OS-package install to zip+openssl May 11, 2026
@atalman

atalman commented May 11, 2026

Copy link
Copy Markdown
Collaborator Author

@pytorchmergebot merge -f "lint and binary builds look good"

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

dsashidh pushed a commit to dsashidh/pytorch that referenced this pull request May 13, 2026
…ytorch#183320)

## Summary

Follow-up to pytorch#182409, addressing the review observation that the new `build_env_setup.py` duplicated the OS-package list already baked into the manywheel builder image (`.ci/docker/manywheel/Dockerfile_2_28`), with no CI use case for the duplication. The drift risk between the Dockerfile and the Python script and the broadened wheel-build-time supply-chain surface (fresh yum/apt fetches vs. the image's frozen baseline) provide no benefit on the standard CI path.

This PR restores the legacy "trust the image" contract for the OS-package list only:

- `install_os_packages` now installs only `zip` + `openssl` on RHEL/Ubuntu (the original `build_common.sh` set). All other yum/apt packages come from `Dockerfile_2_28` at image-build time.
- The nvidia-apt list mangling on Ubuntu is removed (no longer needed once the install set is trimmed).

The CUDA + MAGMA + MKL bootstrap paths (`install_cuda_toolkit`, the `install_magma.sh` fallback in `setup_cuda`, and the `install_mkl.sh` fallback in `main()`) are kept so the script remains usable on a lean manylinux base when those toolkits aren't already staged.

Net diff: 1 file, +15 / -42.

Authored with Claude.

## Test plan

- [ ] Nightly manywheel CUDA / CPU / aarch64 build jobs (Linux) succeed.
- [ ] No regressions from the trimmed OS-package install on Dockerfile_2_28.
Pull Request resolved: pytorch#183320
Approved by: https://github.com/malfet
Alokksinha00 pushed a commit to Alokksinha00/pytorch that referenced this pull request May 15, 2026
…ytorch#183320)

## Summary

Follow-up to pytorch#182409, addressing the review observation that the new `build_env_setup.py` duplicated the OS-package list already baked into the manywheel builder image (`.ci/docker/manywheel/Dockerfile_2_28`), with no CI use case for the duplication. The drift risk between the Dockerfile and the Python script and the broadened wheel-build-time supply-chain surface (fresh yum/apt fetches vs. the image's frozen baseline) provide no benefit on the standard CI path.

This PR restores the legacy "trust the image" contract for the OS-package list only:

- `install_os_packages` now installs only `zip` + `openssl` on RHEL/Ubuntu (the original `build_common.sh` set). All other yum/apt packages come from `Dockerfile_2_28` at image-build time.
- The nvidia-apt list mangling on Ubuntu is removed (no longer needed once the install set is trimmed).

The CUDA + MAGMA + MKL bootstrap paths (`install_cuda_toolkit`, the `install_magma.sh` fallback in `setup_cuda`, and the `install_mkl.sh` fallback in `main()`) are kept so the script remains usable on a lean manylinux base when those toolkits aren't already staged.

Net diff: 1 file, +15 / -42.

Authored with Claude.

## Test plan

- [ ] Nightly manywheel CUDA / CPU / aarch64 build jobs (Linux) succeed.
- [ ] No regressions from the trimmed OS-package install on Dockerfile_2_28.
Pull Request resolved: pytorch#183320
Approved by: https://github.com/malfet
aperson30 pushed a commit to aperson30/pytorch that referenced this pull request Jun 20, 2026
…ytorch#183320)

## Summary

Follow-up to pytorch#182409, addressing the review observation that the new `build_env_setup.py` duplicated the OS-package list already baked into the manywheel builder image (`.ci/docker/manywheel/Dockerfile_2_28`), with no CI use case for the duplication. The drift risk between the Dockerfile and the Python script and the broadened wheel-build-time supply-chain surface (fresh yum/apt fetches vs. the image's frozen baseline) provide no benefit on the standard CI path.

This PR restores the legacy "trust the image" contract for the OS-package list only:

- `install_os_packages` now installs only `zip` + `openssl` on RHEL/Ubuntu (the original `build_common.sh` set). All other yum/apt packages come from `Dockerfile_2_28` at image-build time.
- The nvidia-apt list mangling on Ubuntu is removed (no longer needed once the install set is trimmed).

The CUDA + MAGMA + MKL bootstrap paths (`install_cuda_toolkit`, the `install_magma.sh` fallback in `setup_cuda`, and the `install_mkl.sh` fallback in `main()`) are kept so the script remains usable on a lean manylinux base when those toolkits aren't already staged.

Net diff: 1 file, +15 / -42.

Authored with Claude.

## Test plan

- [ ] Nightly manywheel CUDA / CPU / aarch64 build jobs (Linux) succeed.
- [ ] No regressions from the trimmed OS-package install on Dockerfile_2_28.
Pull Request resolved: pytorch#183320
Approved by: https://github.com/malfet
gplutop7 pushed a commit to gplutop7/pytorch that referenced this pull request Jul 15, 2026
…ytorch#183320)

## Summary

Follow-up to pytorch#182409, addressing the review observation that the new `build_env_setup.py` duplicated the OS-package list already baked into the manywheel builder image (`.ci/docker/manywheel/Dockerfile_2_28`), with no CI use case for the duplication. The drift risk between the Dockerfile and the Python script and the broadened wheel-build-time supply-chain surface (fresh yum/apt fetches vs. the image's frozen baseline) provide no benefit on the standard CI path.

This PR restores the legacy "trust the image" contract for the OS-package list only:

- `install_os_packages` now installs only `zip` + `openssl` on RHEL/Ubuntu (the original `build_common.sh` set). All other yum/apt packages come from `Dockerfile_2_28` at image-build time.
- The nvidia-apt list mangling on Ubuntu is removed (no longer needed once the install set is trimmed).

The CUDA + MAGMA + MKL bootstrap paths (`install_cuda_toolkit`, the `install_magma.sh` fallback in `setup_cuda`, and the `install_mkl.sh` fallback in `main()`) are kept so the script remains usable on a lean manylinux base when those toolkits aren't already staged.

Net diff: 1 file, +15 / -42.

Authored with Claude.

## Test plan

- [ ] Nightly manywheel CUDA / CPU / aarch64 build jobs (Linux) succeed.
- [ ] No regressions from the trimmed OS-package install on Dockerfile_2_28.
Pull Request resolved: pytorch#183320
Approved by: https://github.com/malfet
aws-kingrj pushed a commit to amazon-contributing/upstream-to-pytorch that referenced this pull request Jul 29, 2026
…ytorch#183320)

## Summary

Follow-up to pytorch#182409, addressing the review observation that the new `build_env_setup.py` duplicated the OS-package list already baked into the manywheel builder image (`.ci/docker/manywheel/Dockerfile_2_28`), with no CI use case for the duplication. The drift risk between the Dockerfile and the Python script and the broadened wheel-build-time supply-chain surface (fresh yum/apt fetches vs. the image's frozen baseline) provide no benefit on the standard CI path.

This PR restores the legacy "trust the image" contract for the OS-package list only:

- `install_os_packages` now installs only `zip` + `openssl` on RHEL/Ubuntu (the original `build_common.sh` set). All other yum/apt packages come from `Dockerfile_2_28` at image-build time.
- The nvidia-apt list mangling on Ubuntu is removed (no longer needed once the install set is trimmed).

The CUDA + MAGMA + MKL bootstrap paths (`install_cuda_toolkit`, the `install_magma.sh` fallback in `setup_cuda`, and the `install_mkl.sh` fallback in `main()`) are kept so the script remains usable on a lean manylinux base when those toolkits aren't already staged.

Net diff: 1 file, +15 / -42.

Authored with Claude.

## Test plan

- [ ] Nightly manywheel CUDA / CPU / aarch64 build jobs (Linux) succeed.
- [ ] No regressions from the trimmed OS-package install on Dockerfile_2_28.
Pull Request resolved: pytorch#183320
Approved by: https://github.com/malfet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/binaries Trigger all binary build and upload jobs on the PR Merged topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants