forked from mfederici/dl-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_sweep_2h.sbatch
50 lines (40 loc) · 1.08 KB
/
run_sweep_2h.sbatch
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
#!/bin/bash
#SBATCH --gres=gpu:1
#SBATCH --mem=10G
#SBATCH --cpus-per-task=16
#SBATCH --time 2:00:00
#SBATCH --ntasks=1
#SBATCH --priority=TOP
#SBATCH --job-name=sweep
#SBATCH --output=log.txt
#SBATCH --verbose
# Cuda variables
if [ $DEVICE_NAME = das5 ]
then
echo "Loading modules for das5"
module load cuda10.1/toolkit
# Activate conda
export PATH=/var/scratch/$USER/anaconda3/envs/dl-kit/bin/:$PATH
elif [ $DEVICE_NAME = ivi-cluster ]
then
echo "Setting the variables path for the ivi-cluster"
export CUDA_HOME=/usr/local/cuda-10.2
export PATH=${CUDA_HOME}/bin:${PATH}
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64:$LD_LIBRARY_PATH
export CUDA_CACHE_PATH="$TMPDIR"/.cuda_cache/
export CUDA_CACHE_DISABLE=0
# Activate conda
export PATH=$HOME/anaconda3/envs/dl-kit/bin/:$PATH
else
echo "No CUDA variable is set"
fi
# Make sure you are in the project directory
cd $HOME/Documents/dl-kit
# check wandb and python version
which python
which wandb
# Generate cuda stats to check cuda is found
nvidia-smi
echo Starting
# Run agent
wandb agent $SWEEP