README.md 1.39 KB
Newer Older
Saisri Vegesna's avatar
Saisri Vegesna committed
1
A yml and a set of instructions to build a functioning environment for the Research Computing 
Saisri Vegesna's avatar
Saisri Vegesna committed
2
3
4
5
6

# clone this repo and update with the job composer

Copy and paste the following job script into a job composer job on rc.uab.edu

Saisri Vegesna's avatar
Saisri Vegesna committed
7
```
Saisri Vegesna's avatar
Saisri Vegesna committed
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
#SBATCH --partition=pascalnodes
#SBATCH --gres=gpu:1
#SBATCH --mem-per-cpu=4000
module load cuda10.0/toolkit
module load Anaconda3

FOLDER=/data/user/$USER/slurm-ds
URL=https://gitlab.rc.uab.edu/rc-data-science/createandparsesacct.git
if [ ! -d "$FOLDER" ] ; then
    git clone "$URL" "$FOLDER"
conda env create -f /data/user/$USER/slurm-ds/environment-slurm-ds.yml
else
    cd $FOLDER
    git pull "$URL"
    conda env update -f /data/user/$USER/slurm-ds/environment-slurm-ds.yml
fi
Saisri Vegesna's avatar
Saisri Vegesna committed
25
```
Saisri Vegesna's avatar
Saisri Vegesna committed
26
27
If we have to create a database from sacct
```
Saisri Vegesna's avatar
Saisri Vegesna committed
28
29
directoryToUse="/data/user/$USER/group"
sacct -P -u $USER --starttime=2019-01-01 --format user,start,jobid,jobname,state,partition,maxrss,reqmem,reqcpus,node,nnodes,elapsed >> "$directoryToUse"group.db
Saisri Vegesna's avatar
Saisri Vegesna committed
30
```
Saisri Vegesna's avatar
Saisri Vegesna committed
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
# Check to see if the environment works

After the environment is created, you can start up an interactive Jupyter notebook session through rc.uab.edu to check if the environment works.

Under environment setup, specify

```
# Load required modules
module load cuda10.0/toolkit
module load Anaconda3


```

Under Extra jupyter arguments, specify

```
--notebook-dir=/data/user/$USER/slurm-ds
```

For partition, specify

```
pascalnodes
```