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 () {
exit 1
fi
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
cmd="$NVIDIA_SMI --query-gpu=driver_version --format=csv,noheader,nounits"
driver_versions_list=$($cmd)
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
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