TRACE-VLA code snapshot 2026-11-22 11:47 +07: 456 canonical files + SHA256 manifest + sync report (part 2)
ae1ed83 verified Download code/trace_dashboard/start.sh from phammminhhieu/trace-vla-code: direct link, hf CLI and curl.
- Browser
- Download file 1.26 kB
-
https://huggingface.co/phammminhhieu/trace-vla-code/resolve/main/code/trace_dashboard/start.sh
- Command line
-
hf download hf://phammminhhieu/trace-vla-code/code/trace_dashboard/start.sh
-
curl -L -o start.sh https://huggingface.co/phammminhhieu/trace-vla-code/resolve/main/code/trace_dashboard/start.sh
1.26 kB
| # Start the TRACE-VLA dashboard: static server on 127.0.0.1:8901 + cloudflared | |
| # quick tunnel. Idempotent: safe to re-run (also wired to @reboot cron). | |
| D="$HOME/trace_dashboard" | |
| mkdir -p "$D/www" "$D/bin" | |
| alive() { [ -f "$1" ] && kill -0 "$(cat "$1")" 2>/dev/null; } | |
| # --- server --- | |
| if alive "$D/server.pid"; then | |
| echo "server already running (pid $(cat "$D/server.pid"))" | |
| else | |
| nohup python3 "$D/server.py" >> "$D/server.log" 2>&1 & | |
| echo $! > "$D/server.pid" | |
| echo "server started (pid $!)" | |
| fi | |
| # wait for the server to answer | |
| for i in $(seq 1 15); do | |
| curl -s -o /dev/null "http://127.0.0.1:8901/healthz" && break | |
| sleep 1 | |
| done | |
| # --- tunnel --- | |
| if alive "$D/tunnel.pid"; then | |
| echo "tunnel already running (pid $(cat "$D/tunnel.pid"))" | |
| else | |
| : > "$D/tunnel.log" | |
| nohup "$D/bin/cloudflared" tunnel --url http://127.0.0.1:8901 >> "$D/tunnel.log" 2>&1 & | |
| echo $! > "$D/tunnel.pid" | |
| echo "tunnel started (pid $!)" | |
| fi | |
| # --- extract URL --- | |
| for i in $(seq 1 30); do | |
| url=$(grep -oE 'https://[a-z0-9-]+\.trycloudflare\.com' "$D/tunnel.log" | tail -1) | |
| if [ -n "$url" ]; then | |
| echo "$url" > "$D/tunnel_url.txt" | |
| echo "URL: $url" | |
| exit 0 | |
| fi | |
| sleep 2 | |
| done | |
| echo "WARN: tunnel URL not found yet; check $D/tunnel.log" >&2 | |
| exit 1 | |