Run Linux Python package build entirely in container#3214
Merged
Conversation
Changes the Linux Python package workflow to run all steps inside the manylinux container rather than just the build step via linux_portable_build.py. This simplifies the workflow and prepares for adding S3 upload steps that need AWS CLI available. Changes: - Add container directive to run all steps in manylinux image - Call build_python_packages.py directly instead of linux_portable_build.py - Use requirements.txt for pip dependencies - Remove setup-python action (container has Python) - Move IS_PR_FROM_FORK to job-level env (both workflows) - Minor cleanups: add step names, consistent formatting 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
These are called from ci*.yml.
This was referenced Feb 3, 2026
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.
Motivation
Progress on #1559.
The
build_tools/linux_portable_build.pyscript is an unnecessary layer of indirection in a github actions context that makes our Windows and Linux workflows look quite different. Future work will also use either the AWS CLI (installed in the build container already) or boto3 to upload the Python packages that were built.Technical Details
I've also included some related workflow cleanups in this PR to better align the Windows and Linux workflows.
We should also be able to simplify
.github/workflows/release_portable_linux_packages.yml(on its own, or by calling this workflow) and then either delete that script or keep it relevant only in documentation like https://github.com/ROCm/TheRock/blob/main/docs/environment_setup_guide.md#reference-build-environments (there may be better options like Dev Containers that wouldn't involve a custom script)One reason to keep the script instead of running the entire job under the container is this "prefetch" code that tries to run multiple async steps in parallel:
TheRock/.github/workflows/release_portable_linux_packages.yml
Lines 212 to 216 in c2d46f9
With GitHub Actions, the "Initialize containers" step does block all workflow progress until complete (this takes about 1 minute). A better solution there could be to preload the docker container on our build VM runners.
Test Plan
Submission Checklist