-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgenpipesrc
executable file
·48 lines (43 loc) · 1.71 KB
/
genpipesrc
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
#source /etc/bashrc
#source ~/.bashrc
if [ -z "${QUIET+x}" ]; then
echo -e "\nWait while Genpipes module are loaded. This could take a while, especially if the cvmfs cache is new.\n"
fi
mount -l | grep soft.mugqic 2>/dev/null 1>&2
retcode=$?
if [ ${retcode} -ne 0 ] ; then
# should only run in docker container, not singularity
mount -t cvmfs cvmfs-config.computecanada.ca /cvmfs/cvmfs-config.computecanada.ca/
mount -t cvmfs ref.mugqic /cvmfs/ref.mugqic
mount -t cvmfs soft.mugqic /cvmfs/soft.mugqic
fi
module use $MUGQIC_INSTALL_HOME/modulefiles
if [ -z "${GENPIPES_VERSION+x}" ]; then
GENPIPES_VERSION=$(module avail -d mugqic/genpipes 2>&1 | grep -o '[0-9]\.[0-9]\.[0-9]')
export GENPIPES_VERSION=${GENPIPES_VERSION}
fi
if [[ ${GENPIPES_VERSION##/} =~ 3\.[0-9]+\.[0-9]+ ]]; then
# version 3 releases are in python 2
module load mugqic/python/2.7.14
elif [[ ${GENPIPES_VERSION##/} =~ 4\.[0-9]+\.[0-9]+ ]]; then
# version 4 releases are in python 3
module load mugqic/python/3.10.4
else
# 5 and up are NOT loading python anymore as GenPipes is now a pip package
:
fi
if [[ ${GENPIPES_VERSION##/} =~ local ]]; then
# Development mode, using the cloned repo mounted as /genpipes
if [ -f /genpipes/.genpipes_container_venv/bin/activate ]; then
module load mugqic/python/3.12.2
source /genpipes/.genpipes_container_venv/bin/activate
else
module load mugqic/python/3.12.2
python3 -m venv /genpipes/.genpipes_container_venv
source /genpipes/.genpipes_container_venv/bin/activate
pip install --prefix=/genpipes/.genpipes_container_venv /genpipes
fi
else
# Not in development mode
module load mugqic/genpipes/${GENPIPES_VERSION}
fi