Skip to content

About

Offers tools that streamline the use of AMD GPUs with containers.

Resources

Security policy

Stars

46 stars

Watchers

5 watching

Forks

Repository files navigation

AMD Container Toolkit

The AMD Container Toolkit gives containers access to AMD GPUs. It generates Container Device Interface (CDI) specifications for Docker, Podman, and containerd, and provides an OCI runtime for Docker.

CI Release Docs

The amd-container-toolkit package installs two binaries:

  • amd-ctk: the command-line tool that lists GPUs, manages CDI specifications, configures Docker, and controls the GPU Tracker.
  • amd-container-runtime: the AMD container runtime for Docker.

Features

  • CDI specifications: amd-ctk cdi generate describes every GPU for any CDI-aware runtime. See the CDI Guide.
  • AMD container runtime: select GPUs in Docker by index, range, or UUID with AMD_VISIBLE_DEVICES, or with --gpus on Docker 28.3 or newer.
  • GPU partitioning: assign individual GPU partitions to containers.
  • GPU Tracker: opt-in shared or exclusive GPU access across containers that use the AMD container runtime. See GPU Tracker.
  • Orchestration: Docker Compose and Docker Swarm support.

Requirements

  • Ubuntu 22.04, 24.04, or 26.04, or RHEL 9
  • AMDGPU driver installed on the host (AMD GPU Driver installation guide)
  • Docker 25.0 or newer, or another CDI-aware runtime

See System Requirements for container runtime versions and limits.

Quick Start

On Ubuntu:

sudo apt update && sudo apt install -y wget gpg
sudo mkdir --parents --mode=0755 /etc/apt/keyrings
wget https://repo.radeon.com/rocm/rocm.gpg.key -O - | gpg --dearmor | sudo tee /etc/apt/keyrings/rocm.gpg > /dev/null
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/amd-container-toolkit/apt/ $(. /etc/os-release && echo $VERSION_CODENAME) main" | sudo tee /etc/apt/sources.list.d/amd-container-toolkit.list
sudo apt update && sudo apt install -y amd-container-toolkit

sudo amd-ctk cdi generate
docker run --rm --device amd.com/gpu=all rocm/dev-ubuntu-24.04 amd-smi

On Docker 25.0 to 28.1, run sudo amd-ctk runtime configure && sudo systemctl restart docker before docker run to enable CDI.

For RHEL and the AMD container runtime, see Installation and Quick Start.

Documentation

Building from Source

make                                          # build the binaries in the builder container
make pkg-deb                                  # build the Debian package into bin/
make build-dev-container-rpm && make pkg-rpm  # build the RPM package into bin/
make test                                     # run the unit tests (needs Go on the host)

See the Developer Guide for host builds and contribution guidelines.

Support

Report bugs and request features in GitHub Issues. Report security vulnerabilities privately; see SECURITY.md.

License

Apache 2.0. See LICENSE.

About

Offers tools that streamline the use of AMD GPUs with containers.

Resources

Security policy

Stars

46 stars

Watchers

5 watching

Forks

Releases

Packages

Used by

Contributors

Languages