Hey everyone! I'm running Arch Linux and I'm quite new to Docker, so I really appreciate your help. I'm trying to use Docker to test the NVIDIA GPU setup. I executed the command `docker run --rm --gpus=all nvidia/cuda:12.1.1-base-ubuntu22.04 nvidia-smi`, but I keep encountering a signal 9 error. The detailed error message I got is:
`docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running prestart hook #0: exit status 1, stdout: , stderr: Auto-detected mode as 'legacy'`
Also, I see `nvidia-container-cli: ldcache error: process /sbin/ldconfig terminated with signal 9`. I've already tried reinstalling the nvidia-dkms drivers and the nvidia-container-toolkit, but nothing seems to work. Just as a side note, my kernel version is 6.16.0 and I can run a basic Hello World Docker container without any issues. Any ideas on how to troubleshoot this?
3 Answers
I faced a similar issue when I first started with Docker on Arch. Sometimes, using the Zen kernel can create incompatibility issues with Docker. If possible, you might want to try switching to a more stable kernel and see if that resolves the error. You can also reach out to the Docker community forums and see if anyone else has tackled this problem specifically on Arch Linux.
It looks like Arch Linux isn't officially supported for Docker, which might lead to issues like you're facing. First things first, check if the NVIDIA container runtime is properly installed. You can verify that by running `docker info`. If it's not installed, you'll need to get that set up first.
Also, according to the NVIDIA documentation, you should try running your command like this: `sudo docker run --rm --runtime=nvidia --gpus all ubuntu nvidia-smi`. Let me know if that works for you!
Sometimes, the signal 9 error means that the process is being killed due to resource limits or permissions. Make sure that the Docker daemon has permission to access your GPU. Also, ensure that your NVIDIA drivers are correctly set up. You might want to look at the logs for any additional clues that could point to the problem.

Thanks for the tips! I'll check the runtime installation and try that command.