-
Notifications
You must be signed in to change notification settings - Fork 6
/
env.juno.sh
67 lines (58 loc) · 2.11 KB
/
env.juno.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
#!/bin/bash
# environment settings for use on Juno HPC cluster
# USAGE: . env.juno.sh <target>
# set -eu # NOTE: do not use this because it can propagate into cwl-tool subprocesses and make them break unneccessarily
arg="${1:-None}"
case $arg in
# for running test cases
test)
module load singularity/3.7.1
module load python/3.7.1
module load cwl/cwltool
;;
# for running all test cases including the large integration tests
test-full)
export LARGE_TESTS=True
module load singularity/3.7.1
module load python/3.7.1
module load cwl/cwltool
;;
# for running CWL's with Singularity
singularity)
unset SINGULARITY_CACHEDIR # TODO: why do I need to unset this when I am explicitly setting it in the Makefile??
module load singularity/3.7.1
;;
# for interactive shell session
shell)
module load singularity/3.7.1
module load python/3.7.1
module load cwl/cwltool
module load jq
;;
# for using conda install dependencies
conda)
export PATH=${PWD}/conda/bin:${PATH}
unset PYTHONPATH
unset PYTHONHOME
;;
# for using conda installed Toil and Singularity to run CWL's
toil)
# need to get these env vars to propagate into the HPC jobs; SINGULARITY_DOCKER_USERNAME SINGULARITY_DOCKER_PASSWORD
[ -e /juno/work/ci/kellys5/projects/toil-settings/toil-settings.sh ] && \
. /juno/work/ci/kellys5/projects/toil-settings/toil-settings.sh || \
echo ">>> WARNING: could not find file toil-settings.sh, needed for SINGULARITY_DOCKER_USERNAME and SINGULARITY_DOCKER_PASSWORD; HPC jobs might break!"
# NOTE: in the future might also need these
# TOIL_LSF_ARGS
# SINGULARITY_PULLDIR
# SINGULARITY_CACHEDIR
module load singularity/3.7.1
export PATH=${PWD}/conda/bin:${PATH}
export PATH="$(dirname $(which singularity))":${PATH}
unset PYTHONPATH
unset PYTHONHOME
;;
*)
echo "unrecognized target called"
# exit 1
;;
esac