Skip to content

Instantly share code, notes, and snippets.

@matiasinsaurralde
Created July 28, 2023 21:34
Show Gist options
  • Save matiasinsaurralde/7bbefa99ad7378b9f0b7a79e4f2061ab to your computer and use it in GitHub Desktop.
Save matiasinsaurralde/7bbefa99ad7378b9f0b7a79e4f2061ab to your computer and use it in GitHub Desktop.
nvidia_setup.sh
#!/bin/sh
export distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg
curl -s -L https://nvidia.github.io/libnvidia-container/experimental/$distribution/libnvidia-container.list | sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
apt-get update
apt-get install nvidia-container-toolkit -y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment