From fb09beaafb4f1153b4c4ab8dfaf31ea2d0616ef2 Mon Sep 17 00:00:00 2001 From: Shiv Tyagi Date: Mon, 25 May 2026 13:48:30 +0000 Subject: [PATCH] Add --gpus flag tips for nerdctl and containerd (ctr) nerdctl 2.3.0 and containerd 2.3.0 now support the --gpus flag for AMD GPUs via CDI. Add tips similar to the existing Docker --gpus tip, noting the supported value formats for each tool. --- docs/container-runtime/running-workloads.rst | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/container-runtime/running-workloads.rst b/docs/container-runtime/running-workloads.rst index affa0d6..f8d8db7 100644 --- a/docs/container-runtime/running-workloads.rst +++ b/docs/container-runtime/running-workloads.rst @@ -25,7 +25,7 @@ Use ``--device amd.com/gpu=``. You do **not** need ``--runtime=amd`` when .. tip:: - Starting with Docker **29.3.0**, you can also use ``--gpus `` directly with CDI, without ``--runtime=amd``. ```` can be ``all``, a count (e.g. ``2``), or specific devices (e.g. ``'"device=0,1,2"'``). + Starting with Docker **29.3.0**, you can also use ``--gpus `` for AMD GPUs with CDI, without ``--runtime=amd``. ```` can be ``all``, a count (e.g. ``2``), or specific devices (e.g. ``'"device=0,1,2"'``). .. code-block:: bash @@ -51,6 +51,14 @@ nerdctl works with containerd and supports CDI via ``--device``. nerdctl run --rm --device amd.com/gpu=all rocm/rocm-terminal rocm-smi +.. tip:: + + Starting with nerdctl **2.3.0**, you can also use ``--gpus `` for AMD GPUs with CDI. ```` can be ``all`` or a count (e.g. ``2``). + + .. code-block:: bash + + nerdctl run --rm --gpus all rocm/rocm-terminal rocm-smi + ctr ~~~ @@ -60,6 +68,14 @@ ctr is containerd's native CLI and supports CDI via ``--device``. ctr run --rm --device amd.com/gpu=all docker.io/rocm/rocm-terminal:latest mycontainer rocm-smi +.. tip:: + + Starting with containerd **2.3.0**, ``ctr`` also supports the ``--gpus`` flag for AMD GPUs with CDI. GPUs are requested by index (e.g. ``--gpus 0``). + + .. code-block:: bash + + ctr run --rm --gpus 0 docker.io/rocm/rocm-terminal:latest mycontainer rocm-smi + Requesting specific GPUs ~~~~~~~~~~~~~~~~~~~~~~~~