Repository Public Research preview
1#!/bin/zsh2# run_n1.sh — run N1 scripts sequentially on M4M64a under nohup: log + done-marker per script.3# usage: nohup ./run_n1.sh n1_01_corpus_counts.py n1_02_tokenizer_audit.py > logs/chain.log 2>&1 &4cd ~/firc0002_review || exit 15source .venv/bin/activate6ulimit -n 102407export OMP_NUM_THREADS=8 MKL_NUM_THREADS=8 HF_HUB_OFFLINE=1 TOKENIZERS_PARALLELISM=false PYTHONUNBUFFERED=18mkdir -p logs results9for s in "$@"; do10 name=${s%.py}11 rm -f logs/$name.done logs/$name.failed12 echo "[$(date '+%F %T')] START $s" | tee -a logs/chain.log13 nice -n 10 python -I scripts/$s > logs/$name.log 2>&114 rc=$?15 if [ $rc -eq 0 ]; then date > logs/$name.done; else echo "rc=$rc" > logs/$name.failed; fi16 echo "[$(date '+%F %T')] END $s rc=$rc" | tee -a logs/chain.log17done18