diff --git a/patch.sh b/patch.sh index 4b3d6db..a212f65 100755 --- a/patch.sh +++ b/patch.sh @@ -73,8 +73,9 @@ declare -A object_list=( ["415.27"]='libnvcuvid.so' ) +NVIDIA_SMI="$(which nvidia-smi)" -if ! driver_version=$(/usr/bin/nvidia-smi --query-gpu=driver_version --format=csv,noheader,nounits | head -n 1) ; then +if ! driver_version=$($NVIDIA_SMI --query-gpu=driver_version --format=csv,noheader,nounits | head -n 1) ; then echo 'Something went wrong. Check nvidia driver' exit 1; fi