| # Runs ON Spark via: ssh spark 'bash -s' < this file | |
| # Foreground pull so Hermes terminal(background=true) can track the SSH session. | |
| set -euo pipefail | |
| cd /home/hizrianraz/models/qwen3-coder-next | |
| mkdir -p logs scripts | |
| export OUT_DIR=/home/hizrianraz/models/qwen3-coder-next/Qwen3-Coder-Next-FP8 | |
| export REPO="${REPO:-Qwen/Qwen3-Coder-Next-FP8}" | |
| if [[ -f "$HOME/.cache/huggingface/token" ]]; then | |
| HF_TOKEN="$(cat "$HOME/.cache/huggingface/token")" | |
| export HF_TOKEN | |
| fi | |
| # Prefer pack script if synced; else use local copy under models | |
| if [[ -x /home/hizrianraz/hizrianraz/Qwen3-Coder-Next-Spark-Agentic/scripts/pull_official_fp8.sh ]]; then | |
| PULL=/home/hizrianraz/hizrianraz/Qwen3-Coder-Next-Spark-Agentic/scripts/pull_official_fp8.sh | |
| elif [[ -x ./scripts/pull_official_fp8.sh ]]; then | |
| PULL=./scripts/pull_official_fp8.sh | |
| else | |
| PULL=./pull_official_fp8.sh | |
| fi | |
| LOG="logs/pull-fp8-$(date +%Y%m%dT%H%M%S).log" | |
| echo "START $(date -Is) pull=$PULL log=$LOG" | |
| export LOG | |
| "$PULL" 2>&1 | tee -a "$LOG" | |
| echo "END $(date -Is) status=${PIPESTATUS[0]}" | |
| exit "${PIPESTATUS[0]}" | |