SIGN IN SIGN UP

CI: Create Dockerfiles for running NIXL ontop of ROCm (#1936)

The build process introduced in this PR is based on the change
introduced by #1900 .

## What?
Adds 2 Dockerfiles:
* Dockerfile.rocm.base
* Provides a base OS image with some utilities and a minimal install of
ROCm. Currently this uses the ROCm pre-release repository to target ROCm
7.14.0.
  * May be replaced once an official ROCm 7.14 image is published.
* Dockerfile.rocm
* Based on the existing build.sh script used by NIXL for building the CI
environment, each source dependency build & install step are extracted
into a separate Docker build stage to streamline the overall build.
  * Note, NIXL is not automatically built into this image.

Adds build-rocm.sh, a copy of build.sh that is slightly modified to
build NIXL with ROCm support that may be used by existing tools.

Edits common.sh, tests if nvidia-smi is present prior to use to avoid
emitting an error message. Provides a fallback to try amd-smi if
nvidia-smi is not present.

## Why?
This provides initial support for building & running NIXL in a ROCm
environment.

## How?
Building the base image:
> $ docker buildx build -f .ci/dockerfiles/Dockerfile.rocm.base -t
rocm-base-7.14-ubuntu24.04:latest .

Building the NIXL ROCm image:
> $ docker buildx build -f .ci/dockerfiles/Dockerfile.rocm --build-arg
ROCM_BASE_IMAGE=rocm-base-7.14-ubuntu24.04:latest -t nixl_rocm:latest .

Running the NIXL ROCm image:
> $ docker run -it --rm --device=/dev/kfd --device=/dev/dri --group-add
video --group-add render --security-opt seccomp=unconfined
nixl_rocm:latest

Building NIXL from within the container using build-rocm.sh:
> svc-nixl@e59c68830bd9:/nixl$ PRE_INSTALLED_ENV=true
PRE_INSTALLED_UCX_ENV=true .gitlab/build-rocm.sh /opt/nixl

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added ROCm-enabled container and CI build support for compiling and
packaging required runtime dependencies.
* Added ROCm builds for the application and benchmarking tools,
including optional sanitizer instrumentation.
  * Added automatic GPU detection for both NVIDIA and AMD systems.

* **CI Improvements**
* Expanded copyright validation to accept multiple approved copyright
holders.
* Added configurable environment handling for preinstalled dependencies
and toolchains.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Riley Dixon <riley.dixon@amd.com>
R
Riley Dixon committed
b0196688fb3b7d68d1198179e29d975b2958599a
Parent: b941430
Committed by GitHub <noreply@github.com> on 7/23/2026, 5:37:24 PM