pod-onstart / probe.sh
rayray916's picture
Add probe.sh: power + real HF throughput pre-rent check
60f3bbc
Raw History Blame Contribute Delete
1.17 kB
#!/bin/bash
# Seconds-fast pre-rent check: GPU power (source of truth) + real HF throughput.
echo "=== probe: nvidia-smi ($(date -u +%H:%M:%SZ)) ==="
nvidia-smi
echo
echo "=== probe: power ==="
nvidia-smi --query-gpu=name,power.limit,power.draw,memory.total --format=csv
LIM=$(nvidia-smi --query-gpu=power.limit --format=csv,noheader,nounits | head -1 | awk '{print int($1+0.5)}')
if [ "$LIM" = "600" ]; then echo "PROBE: power limit 600W -> OK"; else echo "PROBE: power limit ${LIM}W -> NOT 600W, destroy this instance"; fi
echo
echo "=== probe: HF network (13 MB test) ==="
SPD=$(curl -sL -o /dev/null -m 25 -w '%{speed_download}' https://huggingface.co/Qwen/Qwen3.8-Flash-Next/resolve/main/tokenizer.json || echo 0)
echo "PROBE: HF download speed: $(awk -v s="${SPD:-0}" 'BEGIN{printf "%.1f", s/1048576}') MB/s"
awk -v s="${SPD:-0}" 'BEGIN{ if (s/1048576 >= 100) print "PROBE: network FAST (weights pull ~2-3 min)"; else if (s/1048576 >= 30) print "PROBE: network OK (weights pull ~10-15 min)"; else print "PROBE: network SLOW (weights pull could take hours) - consider destroying" }'
echo "PROBE-DONE: review power + network above, then destroy or keep"
sleep infinity