Download preflight.sh from AjayRangoji/AR: direct link, hf CLI and curl.
- Browser
- Download file 301 Bytes
-
https://huggingface.co/AjayRangoji/AR/resolve/main/preflight.sh
- Command line
-
hf download hf://AjayRangoji/AR/preflight.sh
-
curl -L -o preflight.sh https://huggingface.co/AjayRangoji/AR/resolve/main/preflight.sh
301 Bytes
| # Runs inside a job: fail if any node's GPUs are already in use by someone else. | |
| srun --ntasks-per-node=1 bash -c ' | |
| u=$(nvidia-smi --query-gpu=memory.used --format=csv,noheader,nounits | awk "{s+=\$1} END {print s}") | |
| echo "preflight $(hostname) gpu_used=${u}MiB" | |
| [ "$u" -lt 2000 ] | |
| ' | |