Skip to content

Commit

Permalink
chore(install-nvidia-driver): do not call nvidia-smi when the NVIDI…
Browse files Browse the repository at this point in the history
…A kernel modules are not loaded
  • Loading branch information
XuehaiPan committed Nov 10, 2023
1 parent 36e66bb commit 83f90f3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion install-nvidia-driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,9 @@ for dm in "${DM_SERVICES[@]}"; do
done

# Disable persistence mode
exec_cmd "sudo nvidia-smi -pm 0 || true"
if [[ -n "$(sudo lsmod | grep '^nvidia' | awk '{ print $1 }')" ]]; then
exec_cmd "sudo nvidia-smi -pm 0 || true"
fi

sleep 1 # ensure the processes are stopped

Expand Down

0 comments on commit 83f90f3

Please sign in to comment.