NVIDIA on Docker

Assumptions:

  • Updated Arch Linux
  • NVIDIA Hardware
  • Docker installed
  • git for AUR

AUR URLS

Steps

Install each of the AUR’s as you would normally, that is

  • git clone the appropriate URL provided on the page
  • makepkg in the directory containing the PKGBUILD
  • Once the package is made pacman -U <package_name>

Test

There’s 2 ways to ensure this is running correctly. Run docker run --gpus all -it busybox /bin/sh

If there are no errors, congrats, GPU’s are now available within your containers

Bonus - Run Stable Diffusion

Follow the instructions available on github here