diff --git a/tests/gpu-container b/tests/gpu-container index 35e1a40ef..fd06d8646 100755 --- a/tests/gpu-container +++ b/tests/gpu-container @@ -20,8 +20,15 @@ EOF fi fi +if mokutil --sb-state | grep -Fx "SecureBoot enabled"; then + echo "SecureBoot needs to be disabled to avoid a prompt to register custom MOK (Machine-Owner Key) during DKMS" >&2 + exit 1 +fi + # Install dependencies -INSTALL_RECOMMENDS=yes install_deps nvidia-utils-525 nvidia-driver-525 +install_deps jq ubuntu-drivers-common +RECOMMENDED_DRIVER="$(ubuntu-drivers devices 2>/dev/null | awk '/nvidia-driver-.*recommended$/ {print $3}')" +INSTALL_RECOMMENDS=yes install_deps "${RECOMMENDED_DRIVER}" # Install LXD install_lxd