Commit 6a30fa54 authored by Georgiy Ignatov's avatar Georgiy Ignatov

Add more descriptive info about driver version detection failure #267

parent aed35c39
...@@ -183,9 +183,15 @@ patch_common () { ...@@ -183,9 +183,15 @@ patch_common () {
exit 1 exit 1
fi fi
if ! driver_version=$("$NVIDIA_SMI" --query-gpu=driver_version --format=csv,noheader,nounits | head -n 1) ; then cmd="$NVIDIA_SMI --query-gpu=driver_version --format=csv,noheader,nounits"
echo 'Something went wrong. Check nvidia driver' driver_versions_list=$($cmd)
exit 1 ret_code=$?
driver_version=$(echo "$driver_versions_list" | head -n 1)
if [ $ret_code -ne 0 ] && [ -nz driver_version ] ; then
echo "Can not detect nvidia driver version."
echo "CMD: \"$cmd\""
echo "Result: \"$driver_versions_list\""
echo "nvidia-smi retcode: $ret_code"
fi fi
echo "Detected nvidia driver version: $driver_version" echo "Detected nvidia driver version: $driver_version"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment