Created
May 4, 2023 03:53
-
-
Save jhurliman/188c32dd09c143b08379e86f76ab8bc5 to your computer and use it in GitHub Desktop.
Shell alias to kill all processes using the GPU. Only for headless NVIDIA GPU machines!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias killgpu='nvidia-smi --query-compute-apps=pid --format=csv,noheader | xargs --no-run-if-empty sudo kill' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment