PS4Research commited on
Commit
4892b4c
·
verified ·
1 Parent(s): 520e413

pod setup script

Browse files
Files changed (1) hide show
  1. pod_setup.sh +30 -0
pod_setup.sh ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ # harvest — one-shot pod setup. Idempotent; safe to re-run.
3
+ # Fetches the self-contained runtime bundle + tools from the public HF repo.
4
+ # No credentials, no build, no torch changes.
5
+ set -uo pipefail
6
+ RT="https://huggingface.co/PS4Research/harvest-runtime/resolve/main"
7
+ W=/tmp/harvest
8
+ mkdir -p "$W"
9
+
10
+ echo "== GPU =="
11
+ nvidia-smi --query-gpu=name,compute_cap,memory.total --format=csv,noheader || { echo "NO GPU — abort"; exit 1; }
12
+
13
+ echo "== python deps =="
14
+ python3 -c "import requests" 2>/dev/null || pip install -q requests
15
+
16
+ echo "== runtime bundle (self-contained llama.cpp, sm_80+sm_120) =="
17
+ if [ -x "$W/portable-fat/run-server.sh" ]; then
18
+ echo " cached"
19
+ else
20
+ curl -fsSL -o "$W/portable-fat.tar.gz" "$RT/portable-fat.tar.gz"
21
+ tar xzf "$W/portable-fat.tar.gz" -C "$W" && rm -f "$W/portable-fat.tar.gz"
22
+ [ -x "$W/portable-fat/run-server.sh" ] || { echo "bundle bad"; exit 1; }
23
+ fi
24
+
25
+ echo "== tools =="
26
+ curl -fsSL -o /tmp/bench-pod.py "$RT/bench-pod.py"
27
+ curl -fsSL -o /tmp/sweep-all.sh "$RT/sweep-all.sh"
28
+ curl -fsSL -o /tmp/pod-bootstrap.sh "$RT/pod-bootstrap.sh"
29
+
30
+ echo "SETUP OK"