mirror of
https://github.com/keylase/nvidia-patch.git
synced 2024-11-26 15:37:18 +00:00
commit
c5f08495b6
@ -173,16 +173,15 @@ patch_common () {
|
|||||||
echo "Using manually entered nvidia driver version: $driver_version"
|
echo "Using manually entered nvidia driver version: $driver_version"
|
||||||
else
|
else
|
||||||
cmd="$NVIDIA_SMI --query-gpu=driver_version --format=csv,noheader,nounits"
|
cmd="$NVIDIA_SMI --query-gpu=driver_version --format=csv,noheader,nounits"
|
||||||
driver_versions_list=$($cmd)
|
driver_versions_list=$($cmd) || (
|
||||||
ret_code=$?
|
ret_code=$?
|
||||||
driver_version=$(echo "$driver_versions_list" | head -n 1)
|
|
||||||
if [[ $ret_code -ne 0 ]] ; then
|
|
||||||
echo "Can not detect nvidia driver version."
|
echo "Can not detect nvidia driver version."
|
||||||
echo "CMD: \"$cmd\""
|
echo "CMD: \"$cmd\""
|
||||||
echo "Result: \"$driver_versions_list\""
|
echo "Result: \"$driver_versions_list\""
|
||||||
echo "nvidia-smi retcode: $ret_code"
|
echo "nvidia-smi retcode: $ret_code"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
)
|
||||||
|
driver_version=$(echo "$driver_versions_list" | head -n 1)
|
||||||
|
|
||||||
echo "Detected nvidia driver version: $driver_version"
|
echo "Detected nvidia driver version: $driver_version"
|
||||||
fi
|
fi
|
||||||
|
9
patch.sh
9
patch.sh
@ -246,16 +246,15 @@ patch_common () {
|
|||||||
echo "Using manually entered nvidia driver version: $driver_version"
|
echo "Using manually entered nvidia driver version: $driver_version"
|
||||||
else
|
else
|
||||||
cmd="$NVIDIA_SMI --query-gpu=driver_version --format=csv,noheader,nounits"
|
cmd="$NVIDIA_SMI --query-gpu=driver_version --format=csv,noheader,nounits"
|
||||||
driver_versions_list=$($cmd)
|
driver_versions_list=$($cmd) || (
|
||||||
ret_code=$?
|
ret_code=$?
|
||||||
driver_version=$(echo "$driver_versions_list" | head -n 1)
|
|
||||||
if [[ $ret_code -ne 0 ]] ; then
|
|
||||||
echo "Can not detect nvidia driver version."
|
echo "Can not detect nvidia driver version."
|
||||||
echo "CMD: \"$cmd\""
|
echo "CMD: \"$cmd\""
|
||||||
echo "Result: \"$driver_versions_list\""
|
echo "Result: \"$driver_versions_list\""
|
||||||
echo "nvidia-smi retcode: $ret_code"
|
echo "nvidia-smi retcode: $ret_code"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
)
|
||||||
|
driver_version=$(echo "$driver_versions_list" | head -n 1)
|
||||||
|
|
||||||
echo "Detected nvidia driver version: $driver_version"
|
echo "Detected nvidia driver version: $driver_version"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user