#!/usr/bin/env bash
set -euo pipefail
# Run in the downloaded release directory on your Linux Docker host.
sha256sum -c launch-tools-r2.tar.gz.sha256
mkdir -p launch-tools-r2
tar -xzf launch-tools-r2.tar.gz -C launch-tools-r2

# Edit these host choices; numerical/runtime settings remain pinned.
MODEL_DIR=/absolute/path/to/pinned-Qwen3.8-checkpoint
RUN_DIR=/absolute/path/to/new-runs/mi50-w4-tp8-mtp0
GPU_RENDER_NODES=renderD128,renderD129,renderD130,renderD131,renderD132,renderD133,renderD134,renderD135

# Verifies model hashes, exact registry image, selected GPUs and peer access.
# Writes the resolved full Docker argv to $RUN_DIR/docker-argv.json and docker-run.sh.
python3 launch-tools-r2/portable/launch.py --config mi50-w4-tp8-mtp0 --model "$MODEL_DIR" --work-dir "$RUN_DIR" --renders "$GPU_RENDER_NODES" --serve
