NVIDIA-DRIVER
NVIDIA DRIVER
on archlinux if we want to use NVIDIA-GPUS in container of docker, we should install some NVIDIA packages.
at first we should install nvidia and nvidia-utils, which can be downloaded by:
1 | sudo pacman -S nvidia nvidia-utils |
when run command of :
1 | nvidia-smi; |
it will show you the information of GPUS of your computer, it done.
and then we should install nvidia-container-runtime:
1 | paru -S nvidia-container-runtime |
we get the directory of nvidia-container-runtime.
sometimes you should install nvidia-container-toolkit with pacman, determinded by version.
(or with follow command lines)
1 | sudo pacman -S nvidia-container-toolkit |
then we should modify the daemon of docker like this:
1 | sudo vim /etc/docker/daemon.json |
to add these into the file:
1 | { |
then restart docker:
1 | sudo systemctl restart docker |
we can comfirm that everything has done like this:
1 | docker run --rm --runtime=nvidia --gpus all nvidia/cuda:12.2.0-base-ubuntu22.04 nvidia-smi |
if you conf correctly, it will show your info of GPUS of your computer.
docker command line homepage
click here to come back to docker command line homepage.





