-
Notifications
You must be signed in to change notification settings - Fork 450
contrib: unified ROCm/CUDA Dockerfile with ROCm build-check CI and wheel workflow #1735
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
andyluo7
wants to merge
11
commits into
ai-dynamo:main
Choose a base branch
from
andyluo7:pr3-rocm-docker
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+530
−61
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
4d94d0f
contrib: unify ROCm and CUDA Dockerfiles via shared common-base stage
andyluo7 0de7663
ci: add ROCm build-check + wheel workflows; add runtime README
andyluo7 d45813d
contrib: trim verbose comments per tvegas1 review
andyluo7 282c4f1
ci: pin actions to SHA, add persist-credentials: false, add concurrency
andyluo7 38a813f
contrib: clarify NIXL_PREFIX and ROCM_PATH origin in README.rocm.md
andyluo7 49df129
ci: raise rocm-build-check timeout to 90 min
andyluo7 3f70f03
meson: drop verbose comments from wheel_variant / python_backend_dir …
andyluo7 b081b63
ci: free disk space before ROCm container build
andyluo7 132b837
ci: make ROCm build-check non-blocking until pre-built base image lands
andyluo7 40baf35
ci: also prune docker build cache before ROCm build
andyluo7 f6086e1
ci: validate ROCm build via cacheonly, skip image export
andyluo7 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| # TODO: replace this compile-only host CI with end-to-end transfer validation | ||
| # on a self-hosted MI300X/MI355X runner once available. | ||
|
|
||
| name: rocm-build-check | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - 'src/**' | ||
| - 'benchmark/nixlbench/**' | ||
| - 'contrib/Dockerfile' | ||
| - 'contrib/build-container.sh' | ||
| - 'contrib/build-wheel.sh' | ||
| - 'meson.build' | ||
| - 'meson_options.txt' | ||
| - '.github/workflows/rocm-build-check.yml' | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| build: | ||
| name: ROCm container build + smoke | ||
| runs-on: ubuntu-latest | ||
| # Non-blocking for now: a from-scratch ROCm build exceeds the hosted-runner | ||
| # budget (the "-complete" image plus building UCX/gRPC/etc. from source runs | ||
| # well past the timeout). Flip to blocking once the build consumes the | ||
| # pre-built ghcr.io/ai-dynamo/nixl-rocm base image so only nixl is compiled. | ||
| continue-on-error: true | ||
| if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }} | ||
| timeout-minutes: 90 | ||
| steps: | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
|
|
||
| # The ROCm "-complete" base image is ~30GB extracted and does not fit on a | ||
| # stock ubuntu-latest runner (~14GB free); reclaim space before building. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe we should fix the runner to use bigger disk? |
||
| - name: Free up disk space | ||
| run: | | ||
| sudo rm -rf /usr/share/dotnet /opt/ghc \ | ||
| /usr/local/lib/android /opt/hostedtoolcache \ | ||
| /usr/local/share/boost /usr/local/.ghcup | ||
| sudo docker image prune -af || true | ||
| sudo docker builder prune -af || true | ||
| df -h / | ||
|
|
||
| # docker-container driver is required for --output=type=cacheonly below. | ||
| - name: Set up buildx (docker-container driver) | ||
| run: docker buildx create --use --driver docker-container --name nixl-ci | ||
|
|
||
| # Build the full ROCm graph without exporting an image. The wheel-presence | ||
| # and `import nixl` -> nixl_rocm smoke checks run as RUN steps inside the | ||
| # rocm-build stage, so --output=cacheonly validates them without the | ||
| # multi-GB image export that OOMs the hosted runner during compression. | ||
| - name: Build ROCm container (validate, no image export) | ||
| run: ./contrib/build-container.sh --rocm --check-only --no-cache | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| # Builds the nixl_rocm wheel on tagged releases and uploads it as a release asset. | ||
|
|
||
| name: wheel-rocm | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'v*' | ||
| workflow_dispatch: | ||
| inputs: | ||
| ref: | ||
| description: 'Git ref to build' | ||
| required: false | ||
| type: string | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| concurrency: | ||
| group: wheel-rocm-${{ github.ref }} | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| build-wheel: | ||
| name: Build nixl_rocm wheel | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 90 | ||
| steps: | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
| with: | ||
| ref: ${{ inputs.ref || github.ref }} | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
|
|
||
| - name: Build ROCm container | ||
| run: ./contrib/build-container.sh --rocm --tag nixl-rocm:wheel --no-cache | ||
|
|
||
| - name: Extract wheels | ||
| run: | | ||
| mkdir -p dist | ||
| id=$(docker create nixl-rocm:wheel) | ||
| docker cp "$id":/workspace/nixl/dist/. dist/ | ||
| docker rm "$id" | ||
| ls -la dist/ | ||
|
|
||
| - name: Upload wheel artifacts | ||
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | ||
| with: | ||
| name: nixl-rocm-wheels | ||
| path: dist/*.whl | ||
| if-no-files-found: error | ||
|
|
||
| - name: Attach to release | ||
| if: startsWith(github.ref, 'refs/tags/v') | ||
| uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2 | ||
| with: | ||
| files: dist/*.whl | ||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we fix the timeout issue instead?