viks66 commited on
Commit
ce1934a
·
verified ·
1 Parent(s): a27baa8

add run.sh

Browse files
Files changed (1) hide show
  1. run.sh +36 -0
run.sh ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ set -e
4
+
5
+ export HF_HOME="/mnt/matylda4/udupa/hugging-face"
6
+ export HF_HUB_OFFLINE=1
7
+ export TRANSFORMERS_OFFLINE=1
8
+ export HF_DATASETS_OFFLINE=1
9
+ export WANDB_MODE=offline
10
+
11
+ GPU=$(/mnt/matylda4/udupa/exps/endpointing/smart-endpointing/sge_utils/free-gpus.sh 1 2>/dev/null) || true
12
+ if [[ "$GPU" =~ ^[0-9,]+$ ]]; then
13
+ export CUDA_VISIBLE_DEVICES=$GPU
14
+ echo "CUDA_VISIBLE_DEVICES=$CUDA_VISIBLE_DEVICES"
15
+ else
16
+ echo "No free GPU found — running on CPU."
17
+ fi
18
+
19
+ SUBMISSION=/mnt/matylda4/udupa/exps/endpointing/sesame_eval/tt-benchmark/baselines/mimi_endpointer/turn-bench-submission
20
+ HARNESS=/mnt/matylda4/udupa/exps/endpointing/sesame_eval/turn-bench-template
21
+ PYTHON=/mnt/matylda4/udupa/miniconda3/bin/python3
22
+
23
+ # install lightweight harness deps into conda once (no uv, avoids lockfile conflicts)
24
+ if ! "$PYTHON" -c "import soxr, rich, typer, moshi, matplotlib" 2>/dev/null; then
25
+ echo "Installing deps into conda env..."
26
+ "$PYTHON" -m pip install rich==15.0.0 typer==0.25.1 soxr==1.1.0 soundfile==0.13.1 matplotlib==3.10.6 --quiet
27
+ "$PYTHON" -m pip install moshi==0.2.11 --no-deps --quiet
28
+ fi
29
+
30
+ # run from submission dir so Python's CWD finds our predict.py, not the harness template stub
31
+ cd "$SUBMISSION"
32
+ PYTHONPATH="$HARNESS" "$PYTHON" -m eval.harness "$@"
33
+
34
+ if [[ "${MIMI_DEBUG:-0}" == "1" ]]; then
35
+ "$PYTHON" "$SUBMISSION/plot_debug.py"
36
+ fi