-
Notifications
You must be signed in to change notification settings - Fork 4
/
run_pnet_training.sh
69 lines (51 loc) · 1.51 KB
/
run_pnet_training.sh
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/bash
#SBATCH --time=0-6:00
#SBATCH --account=def-alister
#SBATCH --mem-per-cpu=100GB
#SBATCH --gres=gpu:a100:1
#SBATCH --job-name=run_pnet
#SBATCH --output="run_pnet_jobID-%j.out"
echo 'SETTING UP POINT NET TRAINING ENVIRONMENT'
echo''
echo 'SLURM_TMPDIR'
echo $SLURM_TMPDIR
echo 'slurm job number'
echo $SLURM_JOB_ID
echo ''
cd $SLURM_TMPDIR
echo "current directory: "
pwd
echo ''
mkdir train_data
mkdir scripts
mkdir container
mkdir results
cp /home/russbate/projects/def-alister/russbate/segmentation/containers/baseml_tf_v0.1.37.sif container
cp /home/russbate/projects/def-alister/russbate/segmentation/pnet_data/*.npy train_data
cp /home/russbate/projects/def-alister/russbate/segmentation/python_scripts/* scripts
cd train_data
echo 'training data directory'
ls -lah
echo ''
cd ../scripts
echo 'executables and python scripts'
ls -lah
echo ''
cd ../container
echo 'container'
ls -lh
echo ''
cd ..
echo 'NVIDIA'
nvidia-smi
echo ''
module load singularity/3.8
singularity exec --nv -B /home/russbate/projects/def-alister/russbate -B ${SLURM_TMPDIR} ${SLURM_TMPDIR}/container/baseml_tf_v0.1.37.sif /bin/bash -c "cd ${SLURM_TMPDIR} && python scripts/pnet_train_loop.py >& scripts/pnet_training_job_${SLURM_JOB_ID}.txt"
echo 'finished singularity exec'
echo ''
ls -lah
cp scripts/pnet_training_job_${SLURM_JOB_ID}.txt /home/russbate/projects/def-alister/russbate/segmentation/training_output/
cp results/* /home/russbate/projects/def-alister/russbate/segmentation/training_output
echo ''
echo 'Finished Job!'
echo ''