Installing Podman and the NVIDIA Container Toolkit#

Next, we will install Podman with the following commands.

Note

For help with podman documentation and syntax, please refer to the official podman documentation.

1Sudo yum update -y
2
3Sudo yum install epel-release -y
4
5Sudo yum install podman -y

Tip

Optional

To check your podman version, run the following:

1Podman –version
2
3Podman info

Installing the NVIDIA Container Toolkit#

Follow the Step 2: Install NVIDIA Container Toolkit to install the NVIDIA Container Toolkit.

Testing Podman and NVIDIA Container Runtime#

Single GPU#

1#### Test nvidia-smi with the latest official CUDA image
2$ sudo podman run --rm --device nvidia.com/gpu=all nvidia/cuda:11.0.3-base-ubuntu20.04 nvidia-smi

Multiple GPUs#

1#### Test nvidia-smi with the latest official CUDA image on two GPUs
2$ sudo podman run --rm --gpus 2 nvidia/cuda:11.0.3-base-ubuntu20.04 nvidia-smi

This test should output nvidia-smi information. Additional information on advanced configuration can be found here.