Repository navigation
Conversation
…st their own .ci/docker
Migrate the CD builder-image workflows to the same content-addressed,
PR-testable scheme CI's docker-builds uses:
- On same-repo PRs, build-manywheel-images.yml and build-almalinux-images.yml
publish the builder image to ECR via OIDC (role/arc), tagged by the
.ci/docker tree hash:
308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/<image-name>:<variant>-<git rev-parse HEAD:.ci/docker>
e.g. pytorch/manylinux2_28-builder:cuda13.0-<hash>, pytorch/almalinux-builder:<variant>-<hash>.
PRs get no environment secrets (DOCKER_TOKEN unavailable), but id-token
works on same-repo PRs; fork PRs stay build-only.
- On push (main / release / rc tags) publishing to Docker Hub is unchanged.
The shared binary-docker-build action selects the registry/tag set per event.
NOTE: build-*-images.yml temporarily pin the binary-docker-build action to this
PR branch so the PR exercises its own copy of the action (OSDC/ARC container
runners cannot resolve local ./ actions). Revert to @main before merge.
… it (cpu/cuda only) Consumer side of the content-addressed builder images. On ciflow/binaries PR test runs, the cpu/cuda binary build/test jobs pull the image the PR just built (pushed to ECR by build-manywheel-images) instead of the Docker Hub floating tag, and wait for it to be published first. - get-docker-tag (linux_binary_build_workflow.yml.j2): on a ciflow/binaries tag, resolve docker_image_suffix to -<.ci/docker tree hash> and docker_registry_host to the ECR host, then log in (read-only) and poll ECR until the builder image is present -- every 5 min, up to 60 min. Release (v*) keeps the Docker Hub pinned image; nightly/other runs skip the job and use the floating Docker Hub tag exactly as before. - New DOCKER_IMAGE_REGISTRY_HOST input on _binary-test-linux (cpu/cuda tests), defaulting to "" so nightly/release resolve to docker.io/pytorch/<image> byte-for-byte as today. - ROCm/XPU are excluded from the ECR path: their test runners have no ECR pull credentials, so they stay on the Docker Hub image (build via manywheel-build, test via _binary-test-rocm-linux / _binary-test-xpu-linux, all docker.io). - Regenerated the linux manywheel binary workflows.
…uest Trigger the CD builder-image workflows on the ciflow/docker label (like docker-builds.yml) instead of pull_request. A maintainer applying ciflow/docker pushes the tag into the base repo, so the ECR push runs in base-repo context with full OIDC even for fork-originated SHAs -- something pull_request runs from forks cannot do. - build-manywheel-images.yml / build-almalinux-images.yml: add `tags: - ciflow/docker/*` to the push trigger, remove the pull_request trigger, and publish (WITH_PUSH) on ciflow/docker tags in addition to main/release/v*. - binary-docker-build: select the ECR content-addressed path on refs/tags/ciflow/docker/* (was github.event_name == 'pull_request'); the ecr-login OIDC step is gated on the same ref. main/release/v* still publish to Docker Hub.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/190749
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 21 Cancelled Jobs, 29 Unrelated Failures, 90 Unclassified FailuresAs of commit 2af3f29 with merge base 8dc5135 ( UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:
CANCELLED JOBS - The following jobs were cancelled. Please retry:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
huydhn
left a comment
There was a problem hiding this comment.
LGTM! Plz update https://github.com/pytorch/pytorch/blob/main/.github/labeler.yml#L189 to reflect the change in almalinux and manywheel workflows
…hanism changes Add the CD builder-image workflows + binary-docker-build action to the ciflow/docker labeler rule so PRs modifying the image-build mechanism itself (not just .ci/docker/**) get the label that builds & pushes the images to ECR.
| # tags to appear before the build/test jobs try to pull them. | ||
| - name: Login to ECR | ||
| if: ${{ startsWith(github.ref, 'refs/tags/ciflow/binaries/') }} | ||
| uses: pytorch/pytorch/.github/actions/ecr-login@main |
There was a problem hiding this comment.
@atalman The PR description states: ROCm/XPU are excluded and stay on the Docker Hub image (their test runners have no ECR pull credentials)., but I think this should be sufficient for the ROCm/XPU runners to get access to ECR, as this is the same mechanism we use for accessing CI base images on ECR.
There was a problem hiding this comment.
ROCm/XPU runners can use this to access PyTorch private ECR before they can use docker pull and docker run later to get the ECR images. This, however, is not the same as how Linux CI/CD jobs work nowadays using GitHub container like https://github.com/pytorch/pytorch/blob/main/.github/workflows/_binary-test-linux.yml#L94-L96. This means:
- No docker command, no docker-in-docker in CI/CD jobs
- Pulling images from public registry like ghcr.io or docker.io is ok, but private ECR will require authentication which doesn't seem to be supported atm https://docs.github.com/en/actions/how-tos/write-workflows/choose-where-workflows-run/run-jobs-in-a-container#defining-credentials-for-a-container-registry
The second point is why @atalman keeps ROCm/XPU unchanged for now
|
hi @jithunnair-amd we would need to migrate ROCm build workflows to same logic as this PR and ROCm test workflows to calculate-docker-image workflow, same as CI . This can be a followup PR |
|
@pytorchmergebot merge -f "all looks good" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
|
@pytorchmergebot revert -c nosignal -m "accidentally merged with temp changes, will revert and reland" |
|
@pytorchbot successfully started a revert job. Check the current status here. |
… PRs test their own .ci/docker (#190749)" This reverts commit d0de32e. Reverted #190749 on behalf of https://github.com/atalman due to accidentally merged with temp changes, will revert and reland ([comment](#190749 (comment)))
|
@atalman your PR has been successfully reverted. |
…190985) ## Summary Follows PR #190749 to enable the manywheel-build matrix job (which carries ROCm/XPU configs) to use the `docker_image_suffix` and `docker_registry_host` outputs from the `get-docker-tag` job. On `ciflow/binaries` PR test runs, the build jobs now pull the content-addressed builder image from ECR -- the same mechanism the inline cpu/cuda builds already use. XPU/ROCm **test** jobs remain on the Docker Hub floating tag since those test runners lack ECR pull credentials. ## Changes - `_binary-build-linux.yml`: add `DOCKER_IMAGE_REGISTRY_HOST` input; update `container.image` and `DOCKER_IMAGE` env to prepend it. - `linux_binary_build_workflow.yml.j2`: pass `docker_image_suffix` and `docker_registry_host` to the `manywheel-build` job for all arch types (previously excluded ROCm/XPU). - Regenerated linux manywheel binary workflows. ## Test Plan ``` python .github/scripts/generate_ci_workflows.py ``` Verified generated workflows have correct GHA expressions with no nested `${{ }}`. Pull Request resolved: #190985 Approved by: https://github.com/jithunnair-amd, https://github.com/atalman
…RPATH Add the ROCm 7.14 nightly binary-wheel build, installing ROCm from the multi-arch TheRock wheel index (https://repo.amd.com/rocm/whl-multi-arch/), and move the matrix window forward: keep rocm7.2, add rocm7.14 (ROCM_ARCHES=["7.2","7.14"]). Combined into one PR now that pytorch#190749 (content-addressed builder images) and pytorch#190985 (ROCm manywheel-build consumes the ECR image) let the PR build its own rocm7.14 .ci/docker image and build/consume the wheel in the same ciflow/binaries run. - install_rocm.sh: install_almalinux() installs ROCm from the wheel index (rocm[libraries,devel,device-all]==${ROCM_VERSION}.*), discovers the root via `rocm-sdk path`, writes /etc/rocm_env.sh (build-time env; no /opt/rocm symlink); dispatched on ID=almalinux. - Dockerfile_2_28: rename the OS-package stage to rocm_final_legacy; new wheel-based rocm_final stage. manywheel/build.sh: fold rocm7.14 into the generic rocm* case (7.14 -> rocm_final + almalinux base via ROCM_VERSION; earlier -> rocm_final_legacy). build-manywheel-images.yml: add the rocm7.14 tag. - repair_wheel.py: RPATH method for the wheel layout instead of the hand-maintained ROCM_SO_FILES bundle. Add rocm_rpaths() ($ORIGIN/../../_rocm_sdk_core/lib + rocm_sysdeps/lib, mirroring cuda_rpaths); for the TheRock wheel layout (ROCM_HOME under _rocm_sdk*) set RPATH and skip bundling; keep rocm_bundle/ROCM_SO_FILES only for the legacy OS layout (/opt/rocm, rocm7.2). - generate_binary_build_matrix.py: ROCM_ARCHES=["7.2","7.14"] + regenerate. - build_env_setup.py: discover_rocm_home() resolves ROCM_HOME dynamically.
…ytorch#190985) ## Summary Follows PR pytorch#190749 to enable the manywheel-build matrix job (which carries ROCm/XPU configs) to use the `docker_image_suffix` and `docker_registry_host` outputs from the `get-docker-tag` job. On `ciflow/binaries` PR test runs, the build jobs now pull the content-addressed builder image from ECR -- the same mechanism the inline cpu/cuda builds already use. XPU/ROCm **test** jobs remain on the Docker Hub floating tag since those test runners lack ECR pull credentials. ## Changes - `_binary-build-linux.yml`: add `DOCKER_IMAGE_REGISTRY_HOST` input; update `container.image` and `DOCKER_IMAGE` env to prepend it. - `linux_binary_build_workflow.yml.j2`: pass `docker_image_suffix` and `docker_registry_host` to the `manywheel-build` job for all arch types (previously excluded ROCm/XPU). - Regenerated linux manywheel binary workflows. ## Test Plan ``` python .github/scripts/generate_ci_workflows.py ``` Verified generated workflows have correct GHA expressions with no nested `${{ }}`. Pull Request resolved: pytorch#190985 Approved by: https://github.com/jithunnair-amd, https://github.com/atalman
…RPATH Add the ROCm 7.14 nightly binary-wheel build, installing ROCm from the multi-arch TheRock wheel index (https://repo.amd.com/rocm/whl-multi-arch/), and move the matrix window forward: keep rocm7.2, add rocm7.14 (ROCM_ARCHES=["7.2","7.14"]). Combined into one PR now that pytorch#190749 (content-addressed builder images) and pytorch#190985 (ROCm manywheel-build consumes the ECR image) let the PR build its own rocm7.14 .ci/docker image and build/consume the wheel in the same ciflow/binaries run. - install_rocm.sh: install_almalinux() installs ROCm from the wheel index (rocm[libraries,devel,device-all]==${ROCM_VERSION}.*), discovers the root via `rocm-sdk path`, writes /etc/rocm_env.sh (build-time env; no /opt/rocm symlink); dispatched on ID=almalinux. - Dockerfile_2_28: rename the OS-package stage to rocm_final_legacy; new wheel-based rocm_final stage. manywheel/build.sh: fold rocm7.14 into the generic rocm* case (7.14 -> rocm_final + almalinux base via ROCM_VERSION; earlier -> rocm_final_legacy). build-manywheel-images.yml: add the rocm7.14 tag. - repair_wheel.py: RPATH method for the wheel layout instead of the hand-maintained ROCM_SO_FILES bundle. Add rocm_rpaths() ($ORIGIN/../../_rocm_sdk_core/lib + rocm_sysdeps/lib, mirroring cuda_rpaths); for the TheRock wheel layout (ROCM_HOME under _rocm_sdk*) set RPATH and skip bundling; keep rocm_bundle/ROCM_SO_FILES only for the legacy OS layout (/opt/rocm, rocm7.2). - generate_binary_build_matrix.py: ROCM_ARCHES=["7.2","7.14"] + regenerate. - build_env_setup.py: discover_rocm_home() resolves ROCM_HOME dynamically.
…RPATH Add the ROCm 7.14 nightly binary-wheel build, installing ROCm from the multi-arch TheRock wheel index (https://repo.amd.com/rocm/whl-multi-arch/), and move the matrix window forward: keep rocm7.2, add rocm7.14 (ROCM_ARCHES=["7.2","7.14"]). Combined into one PR now that pytorch#190749 (content-addressed builder images) and pytorch#190985 (ROCm manywheel-build consumes the ECR image) let the PR build its own rocm7.14 .ci/docker image and build/consume the wheel in the same ciflow/binaries run. - install_rocm.sh: install_almalinux() installs ROCm from the wheel index (rocm[libraries,devel,device-all]==${ROCM_VERSION}.*), discovers the root via `rocm-sdk path`, writes /etc/rocm_env.sh (build-time env; no /opt/rocm symlink); dispatched on ID=almalinux. - Dockerfile_2_28: rename the OS-package stage to rocm_final_legacy; new wheel-based rocm_final stage. manywheel/build.sh: fold rocm7.14 into the generic rocm* case (7.14 -> rocm_final + almalinux base via ROCM_VERSION; earlier -> rocm_final_legacy). build-manywheel-images.yml: add the rocm7.14 tag. - repair_wheel.py: RPATH method for the wheel layout instead of the hand-maintained ROCM_SO_FILES bundle. Add rocm_rpaths() ($ORIGIN/../../_rocm_sdk_core/lib + rocm_sysdeps/lib, mirroring cuda_rpaths); for the TheRock wheel layout (ROCM_HOME under _rocm_sdk*) set RPATH and skip bundling; keep rocm_bundle/ROCM_SO_FILES only for the legacy OS layout (/opt/rocm, rocm7.2). - generate_binary_build_matrix.py: ROCM_ARCHES=["7.2","7.14"] + regenerate. - build_env_setup.py: discover_rocm_home() resolves ROCM_HOME dynamically.
…RPATH Add the ROCm 7.14 nightly binary-wheel build, installing ROCm from the multi-arch TheRock wheel index (https://repo.amd.com/rocm/whl-multi-arch/), and move the matrix window forward: keep rocm7.2, add rocm7.14 (ROCM_ARCHES=["7.2","7.14"]). Combined into one PR now that pytorch#190749 (content-addressed builder images) and pytorch#190985 (ROCm manywheel-build consumes the ECR image) let the PR build its own rocm7.14 .ci/docker image and build/consume the wheel in the same ciflow/binaries run. - install_rocm.sh: install_almalinux() installs ROCm from the wheel index (rocm[libraries,devel,device-all]==${ROCM_VERSION}.*), discovers the root via `rocm-sdk path`, writes /etc/rocm_env.sh (build-time env; no /opt/rocm symlink); dispatched on ID=almalinux. - Dockerfile_2_28: rename the OS-package stage to rocm_final_legacy; new wheel-based rocm_final stage. manywheel/build.sh: fold rocm7.14 into the generic rocm* case (7.14 -> rocm_final + almalinux base via ROCM_VERSION; earlier -> rocm_final_legacy). build-manywheel-images.yml: add the rocm7.14 tag. - repair_wheel.py: RPATH method for the wheel layout instead of the hand-maintained ROCM_SO_FILES bundle. Add rocm_rpaths() ($ORIGIN/../../_rocm_sdk_core/lib + rocm_sysdeps/lib, mirroring cuda_rpaths); for the TheRock wheel layout (ROCM_HOME under _rocm_sdk*) set RPATH and skip bundling; keep rocm_bundle/ROCM_SO_FILES only for the legacy OS layout (/opt/rocm, rocm7.2). - generate_binary_build_matrix.py: ROCM_ARCHES=["7.2","7.14"] + regenerate. - build_env_setup.py: discover_rocm_home() resolves ROCM_HOME dynamically.
…RPATH Add the ROCm 7.14 nightly binary-wheel build, installing ROCm from the multi-arch TheRock wheel index (https://repo.amd.com/rocm/whl-multi-arch/), and move the matrix window forward: keep rocm7.2, add rocm7.14 (ROCM_ARCHES=["7.2","7.14"]). Combined into one PR now that pytorch#190749 (content-addressed builder images) and pytorch#190985 (ROCm manywheel-build consumes the ECR image) let the PR build its own rocm7.14 .ci/docker image and build/consume the wheel in the same ciflow/binaries run. - install_rocm.sh: install_almalinux() installs ROCm from the wheel index (rocm[libraries,devel,device-all]==${ROCM_VERSION}.*), discovers the root via `rocm-sdk path`, writes /etc/rocm_env.sh (build-time env; no /opt/rocm symlink); dispatched on ID=almalinux. - Dockerfile_2_28: rename the OS-package stage to rocm_final_legacy; new wheel-based rocm_final stage. manywheel/build.sh: fold rocm7.14 into the generic rocm* case (7.14 -> rocm_final + almalinux base via ROCM_VERSION; earlier -> rocm_final_legacy). build-manywheel-images.yml: add the rocm7.14 tag. - repair_wheel.py: RPATH method for the wheel layout instead of the hand-maintained ROCM_SO_FILES bundle. Add rocm_rpaths() ($ORIGIN/../../_rocm_sdk_core/lib + rocm_sysdeps/lib, mirroring cuda_rpaths); for the TheRock wheel layout (ROCM_HOME under _rocm_sdk*) set RPATH and skip bundling; keep rocm_bundle/ROCM_SO_FILES only for the legacy OS layout (/opt/rocm, rocm7.2). - generate_binary_build_matrix.py: ROCM_ARCHES=["7.2","7.14"] + regenerate. - build_env_setup.py: discover_rocm_home() resolves ROCM_HOME dynamically.
…RPATH Add the ROCm 7.14 nightly binary-wheel build, installing ROCm from the multi-arch TheRock wheel index (https://repo.amd.com/rocm/whl-multi-arch/), and move the matrix window forward: keep rocm7.2, add rocm7.14 (ROCM_ARCHES=["7.2","7.14"]). Combined into one PR now that pytorch#190749 (content-addressed builder images) and pytorch#190985 (ROCm manywheel-build consumes the ECR image) let the PR build its own rocm7.14 .ci/docker image and build/consume the wheel in the same ciflow/binaries run. - install_rocm.sh: install_almalinux() installs ROCm from the wheel index (rocm[libraries,devel,device-all]==${ROCM_VERSION}.*), discovers the root via `rocm-sdk path`, writes /etc/rocm_env.sh (build-time env; no /opt/rocm symlink); dispatched on ID=almalinux. - Dockerfile_2_28: rename the OS-package stage to rocm_final_legacy; new wheel-based rocm_final stage. manywheel/build.sh: fold rocm7.14 into the generic rocm* case (7.14 -> rocm_final + almalinux base via ROCM_VERSION; earlier -> rocm_final_legacy). build-manywheel-images.yml: add the rocm7.14 tag. - repair_wheel.py: RPATH method for the wheel layout instead of the hand-maintained ROCM_SO_FILES bundle. Add rocm_rpaths() ($ORIGIN/../../_rocm_sdk_core/lib + rocm_sysdeps/lib, mirroring cuda_rpaths); for the TheRock wheel layout (ROCM_HOME under _rocm_sdk*) set RPATH and skip bundling; keep rocm_bundle/ROCM_SO_FILES only for the legacy OS layout (/opt/rocm, rocm7.2). - generate_binary_build_matrix.py: ROCM_ARCHES=["7.2","7.14"] + regenerate. - build_env_setup.py: discover_rocm_home() resolves ROCM_HOME dynamically.
…RPATH Add the ROCm 7.14 nightly binary-wheel build, installing ROCm from the multi-arch TheRock wheel index (https://repo.amd.com/rocm/whl-multi-arch/), and move the matrix window forward: keep rocm7.2, add rocm7.14 (ROCM_ARCHES=["7.2","7.14"]). Combined into one PR now that pytorch#190749 (content-addressed builder images) and pytorch#190985 (ROCm manywheel-build consumes the ECR image) let the PR build its own rocm7.14 .ci/docker image and build/consume the wheel in the same ciflow/binaries run. - install_rocm.sh: install_almalinux() installs ROCm from the wheel index (rocm[libraries,devel,device-all]==${ROCM_VERSION}.*), discovers the root via `rocm-sdk path`, writes /etc/rocm_env.sh (build-time env; no /opt/rocm symlink); dispatched on ID=almalinux. - Dockerfile_2_28: rename the OS-package stage to rocm_final_legacy; new wheel-based rocm_final stage. manywheel/build.sh: fold rocm7.14 into the generic rocm* case (7.14 -> rocm_final + almalinux base via ROCM_VERSION; earlier -> rocm_final_legacy). build-manywheel-images.yml: add the rocm7.14 tag. - repair_wheel.py: RPATH method for the wheel layout instead of the hand-maintained ROCM_SO_FILES bundle. Add rocm_rpaths() ($ORIGIN/../../_rocm_sdk_core/lib + rocm_sysdeps/lib, mirroring cuda_rpaths); for the TheRock wheel layout (ROCM_HOME under _rocm_sdk*) set RPATH and skip bundling; keep rocm_bundle/ROCM_SO_FILES only for the legacy OS layout (/opt/rocm, rocm7.2). - generate_binary_build_matrix.py: ROCM_ARCHES=["7.2","7.14"] + regenerate. - build_env_setup.py: discover_rocm_home() resolves ROCM_HOME dynamically.
…RPATH Add the ROCm 7.14 nightly binary-wheel build, installing ROCm from the multi-arch TheRock wheel index (https://repo.amd.com/rocm/whl-multi-arch/), and move the matrix window forward: keep rocm7.2, add rocm7.14 (ROCM_ARCHES=["7.2","7.14"]). Combined into one PR now that pytorch#190749 (content-addressed builder images) and pytorch#190985 (ROCm manywheel-build consumes the ECR image) let the PR build its own rocm7.14 .ci/docker image and build/consume the wheel in the same ciflow/binaries run. - install_rocm.sh: install_almalinux() installs ROCm from the wheel index (rocm[libraries,devel,device-all]==${ROCM_VERSION}.*), discovers the root via `rocm-sdk path`, writes /etc/rocm_env.sh (build-time env; no /opt/rocm symlink); dispatched on ID=almalinux. - Dockerfile_2_28: rename the OS-package stage to rocm_final_legacy; new wheel-based rocm_final stage. manywheel/build.sh: fold rocm7.14 into the generic rocm* case (7.14 -> rocm_final + almalinux base via ROCM_VERSION; earlier -> rocm_final_legacy). build-manywheel-images.yml: add the rocm7.14 tag. - repair_wheel.py: RPATH method for the wheel layout instead of the hand-maintained ROCM_SO_FILES bundle. Add rocm_rpaths() ($ORIGIN/../../_rocm_sdk_core/lib + rocm_sysdeps/lib, mirroring cuda_rpaths); for the TheRock wheel layout (ROCM_HOME under _rocm_sdk*) set RPATH and skip bundling; keep rocm_bundle/ROCM_SO_FILES only for the legacy OS layout (/opt/rocm, rocm7.2). - generate_binary_build_matrix.py: ROCM_ARCHES=["7.2","7.14"] + regenerate. - build_env_setup.py: discover_rocm_home() resolves ROCM_HOME dynamically.
…RPATH Add the ROCm 7.14 nightly binary-wheel build, installing ROCm from the multi-arch TheRock wheel index (https://repo.amd.com/rocm/whl-multi-arch/), and move the matrix window forward: keep rocm7.2, add rocm7.14 (ROCM_ARCHES=["7.2","7.14"]). Combined into one PR now that pytorch#190749 (content-addressed builder images) and pytorch#190985 (ROCm manywheel-build consumes the ECR image) let the PR build its own rocm7.14 .ci/docker image and build/consume the wheel in the same ciflow/binaries run. - install_rocm.sh: install_almalinux() installs ROCm from the wheel index (rocm[libraries,devel,device-all]==${ROCM_VERSION}.*), discovers the root via `rocm-sdk path`, writes /etc/rocm_env.sh (build-time env; no /opt/rocm symlink); dispatched on ID=almalinux. - Dockerfile_2_28: rename the OS-package stage to rocm_final_legacy; new wheel-based rocm_final stage. manywheel/build.sh: fold rocm7.14 into the generic rocm* case (7.14 -> rocm_final + almalinux base via ROCM_VERSION; earlier -> rocm_final_legacy). build-manywheel-images.yml: add the rocm7.14 tag. - repair_wheel.py: RPATH method for the wheel layout instead of the hand-maintained ROCM_SO_FILES bundle. Add rocm_rpaths() ($ORIGIN/../../_rocm_sdk_core/lib + rocm_sysdeps/lib, mirroring cuda_rpaths); for the TheRock wheel layout (ROCM_HOME under _rocm_sdk*) set RPATH and skip bundling; keep rocm_bundle/ROCM_SO_FILES only for the legacy OS layout (/opt/rocm, rocm7.2). - generate_binary_build_matrix.py: ROCM_ARCHES=["7.2","7.14"] + regenerate. - build_env_setup.py: discover_rocm_home() resolves ROCM_HOME dynamically.
…t their own .ci/docker (pytorch#190749) ## Summary Make `ciflow/binaries` builds test the `.ci/docker` builder image the PR itself produces, instead of the stale Docker Hub floating tag. Uses the same **ECR + OIDC** mechanism CI's `docker-builds` uses. **Nightly and release builds are unchanged (Docker Hub).** ## Producer -- publish the PR image to ECR (`ciflow/docker`) - `build-manywheel-images.yml` / `build-almalinux-images.yml` trigger on `ciflow/docker` (like `docker-builds.yml`). A maintainer applying the label pushes the tag into the base repo, so the ECR push runs in base-repo context with full OIDC (`role/arc`) -- even for fork-originated SHAs. - `binary-docker-build`: on `refs/tags/ciflow/docker/*`, publish the content-addressed image `308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/<image>:<variant>-<.ci/docker tree hash>`. `main` / `release` / `v*` still publish to Docker Hub. ## Consumer -- pull the PR image and wait (`ciflow/binaries`, cpu/cuda) - `get-docker-tag` (in the generated `linux_binary_build_workflow.yml.j2`): on `ciflow/binaries`, resolve the tag suffix + ECR host, then poll ECR until the image is published (build runs concurrently) -- every 5 min, up to 60 min. - New optional `DOCKER_IMAGE_REGISTRY_HOST` input on `_binary-test-linux`, defaulting to `""` so nightly/release stay `docker.io/pytorch/<image>` byte-for-byte. - **ROCm/XPU are excluded** and stay on the Docker Hub image (their test runners have no ECR pull credentials). ## Dependency Requires the `arc` OIDC role to have ECR write on the builder repos (`pytorch/manylinux*-builder`, `pytorch/almalinux-builder`) -- granted in **pytorch-gha-infra#1308**. Pull Request resolved: pytorch#190749 Approved by: https://github.com/huydhn
… PRs test their own .ci/docker (pytorch#190749)" This reverts commit d0de32e. Reverted pytorch#190749 on behalf of https://github.com/atalman due to accidentally merged with temp changes, will revert and reland ([comment](pytorch#190749 (comment)))
…t their own .ci/docker (pytorch#190749) ## Summary Make `ciflow/binaries` builds test the `.ci/docker` builder image the PR itself produces, instead of the stale Docker Hub floating tag. Uses the same **ECR + OIDC** mechanism CI's `docker-builds` uses. **Nightly and release builds are unchanged (Docker Hub).** ## Producer -- publish the PR image to ECR (`ciflow/docker`) - `build-manywheel-images.yml` / `build-almalinux-images.yml` trigger on `ciflow/docker` (like `docker-builds.yml`). A maintainer applying the label pushes the tag into the base repo, so the ECR push runs in base-repo context with full OIDC (`role/arc`) -- even for fork-originated SHAs. - `binary-docker-build`: on `refs/tags/ciflow/docker/*`, publish the content-addressed image `308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/<image>:<variant>-<.ci/docker tree hash>`. `main` / `release` / `v*` still publish to Docker Hub. ## Consumer -- pull the PR image and wait (`ciflow/binaries`, cpu/cuda) - `get-docker-tag` (in the generated `linux_binary_build_workflow.yml.j2`): on `ciflow/binaries`, resolve the tag suffix + ECR host, then poll ECR until the image is published (build runs concurrently) -- every 5 min, up to 60 min. - New optional `DOCKER_IMAGE_REGISTRY_HOST` input on `_binary-test-linux`, defaulting to `""` so nightly/release stay `docker.io/pytorch/<image>` byte-for-byte. - **ROCm/XPU are excluded** and stay on the Docker Hub image (their test runners have no ECR pull credentials). ## Dependency Requires the `arc` OIDC role to have ECR write on the builder repos (`pytorch/manylinux*-builder`, `pytorch/almalinux-builder`) -- granted in **pytorch-gha-infra#1308**. Pull Request resolved: pytorch#190749 Approved by: https://github.com/huydhn
…t their own .ci/docker (pytorch#190749) ## Summary Make `ciflow/binaries` builds test the `.ci/docker` builder image the PR itself produces, instead of the stale Docker Hub floating tag. Uses the same **ECR + OIDC** mechanism CI's `docker-builds` uses. **Nightly and release builds are unchanged (Docker Hub).** ## Producer -- publish the PR image to ECR (`ciflow/docker`) - `build-manywheel-images.yml` / `build-almalinux-images.yml` trigger on `ciflow/docker` (like `docker-builds.yml`). A maintainer applying the label pushes the tag into the base repo, so the ECR push runs in base-repo context with full OIDC (`role/arc`) -- even for fork-originated SHAs. - `binary-docker-build`: on `refs/tags/ciflow/docker/*`, publish the content-addressed image `308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/<image>:<variant>-<.ci/docker tree hash>`. `main` / `release` / `v*` still publish to Docker Hub. ## Consumer -- pull the PR image and wait (`ciflow/binaries`, cpu/cuda) - `get-docker-tag` (in the generated `linux_binary_build_workflow.yml.j2`): on `ciflow/binaries`, resolve the tag suffix + ECR host, then poll ECR until the image is published (build runs concurrently) -- every 5 min, up to 60 min. - New optional `DOCKER_IMAGE_REGISTRY_HOST` input on `_binary-test-linux`, defaulting to `""` so nightly/release stay `docker.io/pytorch/<image>` byte-for-byte. - **ROCm/XPU are excluded** and stay on the Docker Hub image (their test runners have no ECR pull credentials). ## Dependency Requires the `arc` OIDC role to have ECR write on the builder repos (`pytorch/manylinux*-builder`, `pytorch/almalinux-builder`) -- granted in **pytorch-gha-infra#1308**. Pull Request resolved: pytorch#190749 Approved by: https://github.com/huydhn
… PRs test their own .ci/docker (pytorch#190749)" This reverts commit d0de32e. Reverted pytorch#190749 on behalf of https://github.com/atalman due to accidentally merged with temp changes, will revert and reland ([comment](pytorch#190749 (comment)))
…t their own .ci/docker (pytorch#190749) ## Summary Make `ciflow/binaries` builds test the `.ci/docker` builder image the PR itself produces, instead of the stale Docker Hub floating tag. Uses the same **ECR + OIDC** mechanism CI's `docker-builds` uses. **Nightly and release builds are unchanged (Docker Hub).** ## Producer -- publish the PR image to ECR (`ciflow/docker`) - `build-manywheel-images.yml` / `build-almalinux-images.yml` trigger on `ciflow/docker` (like `docker-builds.yml`). A maintainer applying the label pushes the tag into the base repo, so the ECR push runs in base-repo context with full OIDC (`role/arc`) -- even for fork-originated SHAs. - `binary-docker-build`: on `refs/tags/ciflow/docker/*`, publish the content-addressed image `308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/<image>:<variant>-<.ci/docker tree hash>`. `main` / `release` / `v*` still publish to Docker Hub. ## Consumer -- pull the PR image and wait (`ciflow/binaries`, cpu/cuda) - `get-docker-tag` (in the generated `linux_binary_build_workflow.yml.j2`): on `ciflow/binaries`, resolve the tag suffix + ECR host, then poll ECR until the image is published (build runs concurrently) -- every 5 min, up to 60 min. - New optional `DOCKER_IMAGE_REGISTRY_HOST` input on `_binary-test-linux`, defaulting to `""` so nightly/release stay `docker.io/pytorch/<image>` byte-for-byte. - **ROCm/XPU are excluded** and stay on the Docker Hub image (their test runners have no ECR pull credentials). ## Dependency Requires the `arc` OIDC role to have ECR write on the builder repos (`pytorch/manylinux*-builder`, `pytorch/almalinux-builder`) -- granted in **pytorch-gha-infra#1308**. Pull Request resolved: pytorch#190749 Approved by: https://github.com/huydhn
…t their own .ci/docker (pytorch#190749) ## Summary Make `ciflow/binaries` builds test the `.ci/docker` builder image the PR itself produces, instead of the stale Docker Hub floating tag. Uses the same **ECR + OIDC** mechanism CI's `docker-builds` uses. **Nightly and release builds are unchanged (Docker Hub).** ## Producer -- publish the PR image to ECR (`ciflow/docker`) - `build-manywheel-images.yml` / `build-almalinux-images.yml` trigger on `ciflow/docker` (like `docker-builds.yml`). A maintainer applying the label pushes the tag into the base repo, so the ECR push runs in base-repo context with full OIDC (`role/arc`) -- even for fork-originated SHAs. - `binary-docker-build`: on `refs/tags/ciflow/docker/*`, publish the content-addressed image `308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/<image>:<variant>-<.ci/docker tree hash>`. `main` / `release` / `v*` still publish to Docker Hub. ## Consumer -- pull the PR image and wait (`ciflow/binaries`, cpu/cuda) - `get-docker-tag` (in the generated `linux_binary_build_workflow.yml.j2`): on `ciflow/binaries`, resolve the tag suffix + ECR host, then poll ECR until the image is published (build runs concurrently) -- every 5 min, up to 60 min. - New optional `DOCKER_IMAGE_REGISTRY_HOST` input on `_binary-test-linux`, defaulting to `""` so nightly/release stay `docker.io/pytorch/<image>` byte-for-byte. - **ROCm/XPU are excluded** and stay on the Docker Hub image (their test runners have no ECR pull credentials). ## Dependency Requires the `arc` OIDC role to have ECR write on the builder repos (`pytorch/manylinux*-builder`, `pytorch/almalinux-builder`) -- granted in **pytorch-gha-infra#1308**. Pull Request resolved: pytorch#190749 Approved by: https://github.com/huydhn
… PRs test their own .ci/docker (pytorch#190749)" This reverts commit d0de32e. Reverted pytorch#190749 on behalf of https://github.com/atalman due to accidentally merged with temp changes, will revert and reland ([comment](pytorch#190749 (comment)))
…t their own .ci/docker (pytorch#190749) ## Summary Make `ciflow/binaries` builds test the `.ci/docker` builder image the PR itself produces, instead of the stale Docker Hub floating tag. Uses the same **ECR + OIDC** mechanism CI's `docker-builds` uses. **Nightly and release builds are unchanged (Docker Hub).** ## Producer -- publish the PR image to ECR (`ciflow/docker`) - `build-manywheel-images.yml` / `build-almalinux-images.yml` trigger on `ciflow/docker` (like `docker-builds.yml`). A maintainer applying the label pushes the tag into the base repo, so the ECR push runs in base-repo context with full OIDC (`role/arc`) -- even for fork-originated SHAs. - `binary-docker-build`: on `refs/tags/ciflow/docker/*`, publish the content-addressed image `308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/<image>:<variant>-<.ci/docker tree hash>`. `main` / `release` / `v*` still publish to Docker Hub. ## Consumer -- pull the PR image and wait (`ciflow/binaries`, cpu/cuda) - `get-docker-tag` (in the generated `linux_binary_build_workflow.yml.j2`): on `ciflow/binaries`, resolve the tag suffix + ECR host, then poll ECR until the image is published (build runs concurrently) -- every 5 min, up to 60 min. - New optional `DOCKER_IMAGE_REGISTRY_HOST` input on `_binary-test-linux`, defaulting to `""` so nightly/release stay `docker.io/pytorch/<image>` byte-for-byte. - **ROCm/XPU are excluded** and stay on the Docker Hub image (their test runners have no ECR pull credentials). ## Dependency Requires the `arc` OIDC role to have ECR write on the builder repos (`pytorch/manylinux*-builder`, `pytorch/almalinux-builder`) -- granted in **pytorch-gha-infra#1308**. Pull Request resolved: pytorch#190749 Approved by: https://github.com/huydhn
…ytorch#190985) ## Summary Follows PR pytorch#190749 to enable the manywheel-build matrix job (which carries ROCm/XPU configs) to use the `docker_image_suffix` and `docker_registry_host` outputs from the `get-docker-tag` job. On `ciflow/binaries` PR test runs, the build jobs now pull the content-addressed builder image from ECR -- the same mechanism the inline cpu/cuda builds already use. XPU/ROCm **test** jobs remain on the Docker Hub floating tag since those test runners lack ECR pull credentials. ## Changes - `_binary-build-linux.yml`: add `DOCKER_IMAGE_REGISTRY_HOST` input; update `container.image` and `DOCKER_IMAGE` env to prepend it. - `linux_binary_build_workflow.yml.j2`: pass `docker_image_suffix` and `docker_registry_host` to the `manywheel-build` job for all arch types (previously excluded ROCm/XPU). - Regenerated linux manywheel binary workflows. ## Test Plan ``` python .github/scripts/generate_ci_workflows.py ``` Verified generated workflows have correct GHA expressions with no nested `${{ }}`. Pull Request resolved: pytorch#190985 Approved by: https://github.com/jithunnair-amd, https://github.com/atalman
…bel (#191297) PRs with `ciflow/binaries_wheel` or `ciflow/binaries_libtorch` labels still use the dockerhub images instead of the content-addressed docker tags as intended by #190985 and #190749. This leads to some confusing behavior on PRs, like it did on PR [190276](#190276): [this 7.14 build](https://github.com/pytorch/pytorch/actions/runs/30318185296/job/90151385132?pr=190276) successfully used the ECR images (due to ciflow/binaries trigger), but [this 7.14 build](https://github.com/pytorch/pytorch/actions/runs/30318190306/job/90148362471?pr=190276) failed because it tried to use dockerhub images (due to ciflow/binaries_wheel trigger). If the dockerhub images are present, this would lead to even more confusion, as the build jobs wouldn't fail, but wouldn't test the PR changes either. ## Validation Triggered binary manywheel jobs using `ciflow/binaries_libtorch` and `ciflow/binaries_wheel`. The [wheel build job](https://github.com/pytorch/pytorch/actions/runs/30396124811/job/90456295394) picked up the ECR docker image: `308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/manylinux2_28-builder:rocm7.1-919863eb8675cbd1effd9844e75ba81e3bd2de27`. Pull Request resolved: #191297 Approved by: https://github.com/Skylion007, https://github.com/huydhn Co-authored-by: Cursor <[email protected]>
…RPATH Add the ROCm 7.14 nightly binary-wheel build, installing ROCm from the multi-arch TheRock wheel index (https://repo.amd.com/rocm/whl-multi-arch/), and move the matrix window forward: keep rocm7.2, add rocm7.14 (ROCM_ARCHES=["7.2","7.14"]). Combined into one PR now that pytorch#190749 (content-addressed builder images) and pytorch#190985 (ROCm manywheel-build consumes the ECR image) let the PR build its own rocm7.14 .ci/docker image and build/consume the wheel in the same ciflow/binaries run. - install_rocm.sh: install_almalinux() installs ROCm from the wheel index (rocm[libraries,devel,device-all]==${ROCM_VERSION}.*), discovers the root via `rocm-sdk path`, writes /etc/rocm_env.sh (build-time env; no /opt/rocm symlink); dispatched on ID=almalinux. - Dockerfile_2_28: rename the OS-package stage to rocm_final_legacy; new wheel-based rocm_final stage. manywheel/build.sh: fold rocm7.14 into the generic rocm* case (7.14 -> rocm_final + almalinux base via ROCM_VERSION; earlier -> rocm_final_legacy). build-manywheel-images.yml: add the rocm7.14 tag. - repair_wheel.py: RPATH method for the wheel layout instead of the hand-maintained ROCM_SO_FILES bundle. Add rocm_rpaths() ($ORIGIN/../../_rocm_sdk_core/lib + rocm_sysdeps/lib, mirroring cuda_rpaths); for the TheRock wheel layout (ROCM_HOME under _rocm_sdk*) set RPATH and skip bundling; keep rocm_bundle/ROCM_SO_FILES only for the legacy OS layout (/opt/rocm, rocm7.2). - generate_binary_build_matrix.py: ROCM_ARCHES=["7.2","7.14"] + regenerate. - build_env_setup.py: discover_rocm_home() resolves ROCM_HOME dynamically.
…t their own .ci/docker (pytorch#190749) ## Summary Make `ciflow/binaries` builds test the `.ci/docker` builder image the PR itself produces, instead of the stale Docker Hub floating tag. Uses the same **ECR + OIDC** mechanism CI's `docker-builds` uses. **Nightly and release builds are unchanged (Docker Hub).** ## Producer -- publish the PR image to ECR (`ciflow/docker`) - `build-manywheel-images.yml` / `build-almalinux-images.yml` trigger on `ciflow/docker` (like `docker-builds.yml`). A maintainer applying the label pushes the tag into the base repo, so the ECR push runs in base-repo context with full OIDC (`role/arc`) -- even for fork-originated SHAs. - `binary-docker-build`: on `refs/tags/ciflow/docker/*`, publish the content-addressed image `308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/<image>:<variant>-<.ci/docker tree hash>`. `main` / `release` / `v*` still publish to Docker Hub. ## Consumer -- pull the PR image and wait (`ciflow/binaries`, cpu/cuda) - `get-docker-tag` (in the generated `linux_binary_build_workflow.yml.j2`): on `ciflow/binaries`, resolve the tag suffix + ECR host, then poll ECR until the image is published (build runs concurrently) -- every 5 min, up to 60 min. - New optional `DOCKER_IMAGE_REGISTRY_HOST` input on `_binary-test-linux`, defaulting to `""` so nightly/release stay `docker.io/pytorch/<image>` byte-for-byte. - **ROCm/XPU are excluded** and stay on the Docker Hub image (their test runners have no ECR pull credentials). ## Dependency Requires the `arc` OIDC role to have ECR write on the builder repos (`pytorch/manylinux*-builder`, `pytorch/almalinux-builder`) -- granted in **pytorch-gha-infra#1308**. Pull Request resolved: pytorch#190749 Approved by: https://github.com/huydhn
… PRs test their own .ci/docker (pytorch#190749)" This reverts commit d0de32e. Reverted pytorch#190749 on behalf of https://github.com/atalman due to accidentally merged with temp changes, will revert and reland ([comment](pytorch#190749 (comment)))
…t their own .ci/docker (pytorch#190749) ## Summary Make `ciflow/binaries` builds test the `.ci/docker` builder image the PR itself produces, instead of the stale Docker Hub floating tag. Uses the same **ECR + OIDC** mechanism CI's `docker-builds` uses. **Nightly and release builds are unchanged (Docker Hub).** ## Producer -- publish the PR image to ECR (`ciflow/docker`) - `build-manywheel-images.yml` / `build-almalinux-images.yml` trigger on `ciflow/docker` (like `docker-builds.yml`). A maintainer applying the label pushes the tag into the base repo, so the ECR push runs in base-repo context with full OIDC (`role/arc`) -- even for fork-originated SHAs. - `binary-docker-build`: on `refs/tags/ciflow/docker/*`, publish the content-addressed image `308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/<image>:<variant>-<.ci/docker tree hash>`. `main` / `release` / `v*` still publish to Docker Hub. ## Consumer -- pull the PR image and wait (`ciflow/binaries`, cpu/cuda) - `get-docker-tag` (in the generated `linux_binary_build_workflow.yml.j2`): on `ciflow/binaries`, resolve the tag suffix + ECR host, then poll ECR until the image is published (build runs concurrently) -- every 5 min, up to 60 min. - New optional `DOCKER_IMAGE_REGISTRY_HOST` input on `_binary-test-linux`, defaulting to `""` so nightly/release stay `docker.io/pytorch/<image>` byte-for-byte. - **ROCm/XPU are excluded** and stay on the Docker Hub image (their test runners have no ECR pull credentials). ## Dependency Requires the `arc` OIDC role to have ECR write on the builder repos (`pytorch/manylinux*-builder`, `pytorch/almalinux-builder`) -- granted in **pytorch-gha-infra#1308**. Pull Request resolved: pytorch#190749 Approved by: https://github.com/huydhn
…ytorch#190985) ## Summary Follows PR pytorch#190749 to enable the manywheel-build matrix job (which carries ROCm/XPU configs) to use the `docker_image_suffix` and `docker_registry_host` outputs from the `get-docker-tag` job. On `ciflow/binaries` PR test runs, the build jobs now pull the content-addressed builder image from ECR -- the same mechanism the inline cpu/cuda builds already use. XPU/ROCm **test** jobs remain on the Docker Hub floating tag since those test runners lack ECR pull credentials. ## Changes - `_binary-build-linux.yml`: add `DOCKER_IMAGE_REGISTRY_HOST` input; update `container.image` and `DOCKER_IMAGE` env to prepend it. - `linux_binary_build_workflow.yml.j2`: pass `docker_image_suffix` and `docker_registry_host` to the `manywheel-build` job for all arch types (previously excluded ROCm/XPU). - Regenerated linux manywheel binary workflows. ## Test Plan ``` python .github/scripts/generate_ci_workflows.py ``` Verified generated workflows have correct GHA expressions with no nested `${{ }}`. Pull Request resolved: pytorch#190985 Approved by: https://github.com/jithunnair-amd, https://github.com/atalman
…RPATH (#190276) ## Summary Adds the ROCm 7.14 nightly binary-wheel build, installing ROCm from the multi-arch TheRock wheel index (`https://repo.amd.com/rocm/whl-multi-arch/`). Matrix: `ROCM_ARCHES = ["7.2", "7.14"]`. Re-combined into one PR (docker image + wheels) now that #190749 (content-addressed builder images) and #190985 (ROCm `manywheel-build` consumes the ECR image via `get-docker-tag`) let a single PR build its own `rocm7.14` `.ci/docker` image (pushed to ECR on `ciflow/docker`) and build/consume the wheel in the same `ciflow/binaries` run. ## Changes - `.ci/docker/common/install_rocm.sh`: `install_almalinux()` (mirrors `install_ubuntu()`) installs ROCm from the wheel index (`rocm[libraries,devel,device-all]==${ROCM_VERSION}.*`), discovers the root via `rocm-sdk path`, writes `/etc/rocm_env.sh` (build-time env; no `/opt/rocm` symlink); dispatched on `ID=almalinux`. - `.ci/docker/manywheel/Dockerfile_2_28`: OS-package stage renamed to `rocm_final_legacy`; new wheel-based `rocm_final` stage. `.ci/docker/manywheel/build.sh`: folded rocm7.14 into the generic `rocm*` case (7.14 -> `rocm_final` + almalinux base via `ROCM_VERSION`; earlier -> `rocm_final_legacy` + `rocm/dev-almalinux-8`). `build-manywheel-images.yml`: add the `rocm7.14` tag. - **`.ci/manywheel/repair_wheel.py`: RPATH method.** Instead of hand-maintaining `ROCM_SO_FILES` and bundling, add `rocm_rpaths()` (`$ORIGIN/../../_rocm_sdk_core/lib` + `rocm_sysdeps/lib`, mirroring `cuda_rpaths()`). For the TheRock wheel layout (`ROCM_HOME` under `_rocm_sdk*`) set RPATH and skip bundling; keep `rocm_bundle`/`ROCM_SO_FILES` only for the legacy OS layout (`/opt/rocm`, rocm7.2). This gets us out of maintaining a fragile list of ROCm libraries. - `.github/scripts/generate_binary_build_matrix.py`: `ROCM_ARCHES=["7.2","7.14"]` + regenerated workflow. `.ci/manywheel/build_env_setup.py`: `discover_rocm_home()`. ## Notes - RPATH is currently used only for the wheel-based rocm7.14 layout; rocm7.2 (OS `/opt/rocm`) keeps the self-contained bundle. The RPATH resolves the ROCm libs from the `rocm` pip package (`_rocm_sdk_core`, sibling of torch), the same way CUDA/XPU resolve from their pip packages, combined with `_preload_rocm_deps` (#188454). - RPATH-only for now: relies on `_rocm_sdk_core` being co-installed with torch in the CI build/test image; declaring `rocm` as an end-user `PYTORCH_EXTRA_INSTALL_REQUIREMENTS` is a follow-up. - Per #190749, the ROCm/XPU GPU **test** path stays on the Docker Hub image. ## Validation Built `manylinux2_28-builder:rocm7.14` locally: `install_almalinux` installs 7.14 from `repo.amd.com`; `hipcc --version` reports HIP 7.14.60850; `$ROCM_HOME/lib` has runtime `.so`s + `rocm_sysdeps/lib`. ruff/bash/py checks pass. Pull Request resolved: #190276 Approved by: https://github.com/jithunnair-amd, https://github.com/atalman Co-authored-by: Jithun Nair <[email protected]>
Summary
Make
ciflow/binariesbuilds test the.ci/dockerbuilder image the PR itself produces, instead of the stale Docker Hub floating tag. Uses the same ECR + OIDC mechanism CI'sdocker-buildsuses. Nightly and release builds are unchanged (Docker Hub).Producer -- publish the PR image to ECR (
ciflow/docker)build-manywheel-images.yml/build-almalinux-images.ymltrigger onciflow/docker(likedocker-builds.yml). A maintainer applying the label pushes the tag into the base repo, so the ECR push runs in base-repo context with full OIDC (role/arc) -- even for fork-originated SHAs.binary-docker-build: onrefs/tags/ciflow/docker/*, publish the content-addressed image308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/<image>:<variant>-<.ci/docker tree hash>.main/release/v*still publish to Docker Hub.Consumer -- pull the PR image and wait (
ciflow/binaries, cpu/cuda)get-docker-tag(in the generatedlinux_binary_build_workflow.yml.j2): onciflow/binaries, resolve the tag suffix + ECR host, then poll ECR until the image is published (build runs concurrently) -- every 5 min, up to 60 min.DOCKER_IMAGE_REGISTRY_HOSTinput on_binary-test-linux, defaulting to""so nightly/release staydocker.io/pytorch/<image>byte-for-byte.Dependency
Requires the
arcOIDC role to have ECR write on the builder repos (pytorch/manylinux*-builder,pytorch/almalinux-builder) -- granted in pytorch-gha-infra#1308.cc @huydhn @pytorch/pytorch-dev-infra