Files
cloud-worker/scripts/pod/install-minimax-h3.sh
T
2026-08-06 03:01:30 -04:00

37 lines
1.5 KiB
Bash

#!/bin/bash
# One-shot MiniMax H3 setup for a fresh RunPod pod. Idempotent — safe to re-run
# after a pod reset (which wipes everything outside /workspace).
#
# Usage (from your machine, repo root):
# scripts/local/push-to-pod.sh # copies repo files to the pod
# ssh -p <port> root@<pod-ip> 'bash /workspace/minimax-h3/install-minimax-h3.sh'
set -euo pipefail
# --- ComfyUI itself (container disk; gone after any pod edit/reset) ---
if [ ! -d /ComfyUI ]; then
git clone https://github.com/Comfy-Org/ComfyUI.git /ComfyUI
fi
cd /ComfyUI
pip install -q --break-system-packages --no-warn-script-location -r requirements.txt
pip install -q --break-system-packages hf_transfer
# --- configs from the repo (staged under /workspace/minimax-h3 by push-to-pod) ---
STAGE=/workspace/minimax-h3
cp "$STAGE"/extra_model_paths.yaml /ComfyUI/extra_model_paths.yaml
mkdir -p /ComfyUI/user/default/workflows
cp "$STAGE"/workflows/*.json /ComfyUI/user/default/workflows/
# --- test/reference images (synthetic + real reference sets) ---
python3 "$STAGE"/make-test-images.py
python3 "$STAGE"/fetch-bench-images.py || echo "WARN: v1 image fetch incomplete"
python3 "$STAGE"/fetch-bench-images-v2.py || echo "WARN: v2 image fetch incomplete"
# --- weights (skips files already on the volume) ---
tmux new -s downloads -d "bash $STAGE/download-weights.sh" 2>/dev/null \
|| echo "downloads session already exists"
# --- ComfyUI headless ---
bash "$STAGE"/start-comfyui.sh
echo "Done. Downloads: tail -f /workspace/minimax-h3/download.log"