Automatically shut down pod after being idle for X mins
Hi guys, a general question: I'd like to automatically shut down my pod after being idle for 30 mins (so I can complete several trainings overnight). I've found this command
bash -c "nohup sleep 2h; runpodctl stop pod $RUNPOD_POD_ID" &
but the thing is that I have to pre-define after which period the pod gets shut down. Is there any functionality that automatically monitors the pod's status and shuts it down after being idle for X mins?4 Replies
Could you monitor the GPU usage and then shut down X minutes after GPU VRAM goes to 0, or similar?
Yes that would be a nice solution. How could I achieve this? 🙂
I'm not sure if this is official or not but below is how I poll the GPU in JavaScript, using graphQL.
Thanks a lot!