forked from kuangliu/pytorch-cifar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.slurm
40 lines (30 loc) · 1.27 KB
/
main.slurm
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
#!/bin/bash
#SBATCH --nodes=1
#SBATCH --job-name=resnet18_cifar10_alt2 # job name
#SBATCH --workdir=/home/alpayozkan/ # working directory
#SBATCH --nodelist=romer1
#SBATCH --gres=gpu:1 # or you can specify gpu type: --gres=gpu:rtx2080ti:1 # how many gpu(s) will be reserved
#SBATCH --output=/home/alpayozkan/denge_exps/resnet18_cifar10_alt2-%j.out # output file
#SBATCH --error=/home/alpayozkan/denge_exps/resnet18_cifar10_alt2-%j.err # error file
#SBATCH --time=2-00:00:00 # max job time. (currently no need to use)
########### Cuda paths, you may not need that #############
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/cuda/lib64
#########################################################
###### notebook to run
nb=main
nb_dir=~/.git/pytorch-cifar-exp
###### log wandb under denge_exps/
# dir=/home/alpayozkan/denge_exps
###### activate conda env
# conda init
# conda activate prob2
# source activate prob2
###### convert ipynb => py
# jupyter nbconvert --to python $nb_dir/$nb.ipynb
# mv $nb_dir/$nb.py $dir
###### train model
python $nb_dir/$nb.py
which nvcc
###### success message
echo "JOB DONE!!!"