-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_spikeinterface.sh
More file actions
47 lines (39 loc) · 1.12 KB
/
run_spikeinterface.sh
File metadata and controls
47 lines (39 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
#SBATCH -p gpu
#SBATCH -N 1
#SBATCH --mem=40G
#SBATCH --gpus-per-node=1
#SBATCH -n 30
#SBATCH -t 5-00:00:00
#SBATCH --mail-type=END,FAIL
#SBATCH --job-name=spike_sorting
#SBATCH -o spike_sorting_%j.out
#SBATCH -e spike_sorting_%j.err
# -------------------------------
# LOAD MODULES
# -------------------------------
module load mamba
module load cuda/12.2
# -------------------------------
# ACTIVATE MICROMAMBA ENV
# -------------------------------
eval "$(/nfs/nhome/live/vplattner/.local/bin/micromamba shell hook bash)"
micromamba activate si_ks4_env
# -------------------------------
# ARGUMENT HANDLING
# -------------------------------
DATA_PATH="$1"
OUTPUT_PATH="$2"
if [ -z "$DATA_PATH" ]; then
echo "Usage: sbatch run_spikeinterface.sh <data_path> [output_path] [--show_probe] [--show_preprocessing]"
exit 1
fi
if [ -z "$OUTPUT_PATH" ]; then
OUTPUT_PATH="./spike_sorting_output"
fi
shift 2 || true
# -------------------------------
# RUN SCRIPT
# -------------------------------
echo "Starting spike sorting with Kilosort 4..."
python spikeinterface_batch.py "$DATA_PATH" --output_path "$OUTPUT_PATH" "$@"