#!/usr/bin/env bash # scale_boot.sh : fresh box -> worker W (of 2) of the long V46 run (queue_v46.txt): TensorRT, Lc0 T3 teacher, then auto.sh (shards, fastprep, # the DiLoCo run with HF checkpoints; resumes after a box death). Worker 0 also runs the engine speed test (sims_pre.sh) while the data is prepared. set -u W=${1:-0} cd /marimo/chess PY=/tmp/uv-venv/bin/python export HF_HUB_DISABLE_PROGRESS_BARS=1 HF_XET_HIGH_PERFORMANCE=1 REPO=Asilarkness/chess-nets mkdir -p logs say() { echo "$(date -u +%H:%M) $*" >> logs/auto.log; } say "SCALE BOOT w$W" (uv pip install --python $PY chess numba pyarrow onnx 2>&1 || $PY -m pip install chess numba pyarrow onnx 2>&1) | tail -1 CU=$($PY -c "import torch; print(torch.version.cuda.split('.')[0])") $PY -c "import tensorrt" 2>/dev/null || uv pip install --python $PY "tensorrt-cu$CU" 2>&1 | tail -2 NET=t3-512x15x16h-distill-swa-2767500 bash code/lc0setup.sh $NET t3 || { say T3_FAILED; exit 1; } [ -f lc0w/$NET.f16.onnx ] || ./lc0src/build/lc0 leela2onnx --input=lc0w/$NET.pb.gz --output=lc0w/$NET.f16.onnx --onnx-data-type=f16 >> logs/auto.log 2>&1 [ -f lc0w/$NET.f16.onnx ] || { say T3_F16_FAILED; exit 1; } say "T3 READY" export NW=2 QUEUE_FILE=code/queue_v46.txt SKIP_TESTS=1 [ "$W" = 0 ] && export PRE_HOOK=code/sims_pre.sh bash code/auto.sh "$W" >> logs/scale_auto.out 2>&1 say "AUTO EXIT $?"