#!/usr/bin/env bash # Second repair. --no-deps left torch 2.12.0 without a matching NCCL # (undefined symbol: ncclCommResume). Install torch WITH its dependency set from # the cu130 index so the whole nvidia stack is consistent, then re-verify. set -uo pipefail RT=/KRAFTON/WORKSPACE/wbl-workspace/posttraining-2606/.b300-runtime PY=$RT/bin/python LOG=$RT/restore.log log(){ echo "[$(date '+%F %H:%M:%S')] FIX2 $*" | tee -a "$LOG"; } log "reinstalling torch 2.12.0+cu130 WITH deps" $PY -m pip install --no-cache-dir --force-reinstall \ torch==2.12.0 --index-url https://download.pytorch.org/whl/cu130 >>"$LOG" 2>&1 log "torch rc=$?" log "=== verification ===" $PY - <<'PY' 2>&1 | tee -a "$LOG" import importlib for m in ["torch","transformer_engine","megatron.core","megatron.bridge","transformers","mamba_ssm","causal_conv1d"]: try: mod=importlib.import_module(m) print(f" OK {m:20s} {getattr(mod,'__version__','')}") except Exception as e: print(f" MISS {m:20s} {type(e).__name__}: {str(e)[:70]}") PY log "FIX2 DONE"