Skip to content

Instantly share code, notes, and snippets.

@MrOplus
Last active August 10, 2025 05:57
Show Gist options
  • Select an option

  • Save MrOplus/a71ae15ff48e83e8af8991cdc30336f2 to your computer and use it in GitHub Desktop.

Select an option

Save MrOplus/a71ae15ff48e83e8af8991cdc30336f2 to your computer and use it in GitHub Desktop.
Install GPU Util on ec2
apt install -y ubuntu-drivers-common
ubuntu-drivers install
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
&& curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list | \
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
sed -i -e '/experimental/ s/^#//g' /etc/apt/sources.list.d/nvidia-container-toolkit.list
apt-get update
export NVIDIA_CONTAINER_TOOLKIT_VERSION=1.17.8-1
curl https://get.docker.com | sh
sudo apt-get install -y \
nvidia-container-toolkit=${NVIDIA_CONTAINER_TOOLKIT_VERSION} \
nvidia-container-toolkit-base=${NVIDIA_CONTAINER_TOOLKIT_VERSION} \
libnvidia-container-tools=${NVIDIA_CONTAINER_TOOLKIT_VERSION} \
libnvidia-container1=${NVIDIA_CONTAINER_TOOLKIT_VERSION}
nvidia-ctk runtime configure --runtime=docker
reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment