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

# 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-w8-tp4-mtp0
GPU_RENDER_NODES=renderD128,renderD129,renderD130,renderD131

# 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-mi50-r3/portable/launch.py --config mi50-w8-tp4-mtp0 --model "$MODEL_DIR" --work-dir "$RUN_DIR" --renders "$GPU_RENDER_NODES" --serve
