Add ability to run NVIDIA containers without the NVIDIA container toolkit

This commit is contained in:
Josh.5
2024-03-14 19:23:34 +13:00
parent f17d31d077
commit 9c20a0f1f5
4 changed files with 25 additions and 3 deletions

View File

@@ -217,6 +217,11 @@ if [ "${nvidia_pci_address:-}X" != "X" ]; then
print_header "Found NVIDIA device '${nvidia_gpu_name:?}'"
install_nvidia_driver
patch_nvidia_driver
elif [ "${NVIDIA_DRIVER_VERSION:-}X" != "X" ]; then
export nvidia_host_driver_version="${NVIDIA_DRIVER_VERSION:?}"
print_header "Forcing install of NVIDIA driver version '${nvidia_host_driver_version:?}' because the 'NVIDIA_DRIVER_VERSION' variable is set."
install_nvidia_driver
patch_nvidia_driver
else
print_header "No NVIDIA device found"
fi