Created
March 12, 2022 08:43
-
-
Save woolpeeker/35a881bb26b439fe5220acae5f32bf93 to your computer and use it in GitHub Desktop.
script for grabbing gpu
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
while true | |
do | |
m=`nvidia-smi --format=csv --query-gpu=memory.used 2>&1 | awk '{if(NR>1 && NR<=2)print $1}'` | |
if [ $m -lt 2000 ] | |
then | |
echo executing | |
exec python tools/train.py --gpus 0,1 configs/res18.yaml --name res18_base | |
else | |
echo memory $m | |
sleep 1 | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment