Indeed, I would recommand
podman, since it’s open source and intrinsicly rootless, whiledockerhas to be tweaked to be rootless.The following content will be based on
podman, but I guessdockerwill be just be the same.
While I’m using Arch Linux for CUDA development and entertainment, the most often thing that I encounter is nvcc, gcc, cuda version mismatch, either gcc too new for nvcc, or cuda too new for PyTorch-oriented projects. By the time I wrote this blog, I just stumbled into an issue on using CUTLASS that gcc is 16.1.1 and some C++23 features are not yet supported by nvcc for cuda 13.2.
Thus, a better way to handle this inconsistency is to compile in some containers, to ensure the environment is the same.
Choose a Proper Image
It’s suggested to select the devel image, as it’s the most complete that includes runtime and headers. So I chose to pull the official image
1 | podman pull docker.io/nvidia/cuda:13.1.2-cudnn-devel-ubuntu24.04 |
GPU Support for Podman
I simply follow the steps here: 👉 podman documentation
After configuration, remember to select GPU devices for the container using --device nvidia.com/gpu=all
1 | # test if GPU support is active |
Mounting CUTLASS
My cutlass installation is at /opt/cutlass, and indeed we only need the include/cute and include/cutlass under this root.
For podman, it seems that I connot have my internet connected. So I have to manually mount my cutlass installation under /usr/include/... with -v {HostDir}:{TargetDir}
So the final command looks like
1 | podman run |