-
Notifications
You must be signed in to change notification settings - Fork 8
/
install.sh
executable file
·53 lines (45 loc) · 1.91 KB
/
install.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
#!/usr/bin/env bash
### Cleaning up the environment
unset PYTHONPATH
unset CONDA_PREFIX
GIT_DIR=$(basename $(dirname $(realpath -e $0)))
INSTALL_BASE_DIR=$(realpath $(pwd -P)/miniconda)
### Install conda
if [[ "$OSTYPE" == "darwin"* ]]; then
wget -q https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh \
-O miniconda.sh && chmod +x miniconda.sh
else
wget -q https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh \
-O miniconda.sh && chmod +x miniconda.sh
fi
bash miniconda.sh -b -p ${INSTALL_BASE_DIR} && rm miniconda.sh
export PATH=${INSTALL_BASE_DIR}/bin:$PATH
conda config --set always_yes yes --set changeps1 no
conda install -n base conda-libmamba-solver
conda config --set solver libmamba
### Install environments
ENV_NAME=umccrise
conda env create -p ${INSTALL_BASE_DIR}/envs/${ENV_NAME} --file ${GIT_DIR}/envs/umccrise.yml
conda env create -p ${INSTALL_BASE_DIR}/envs/${ENV_NAME}_hmf --file ${GIT_DIR}/envs/hmf.yml
conda env create -p ${INSTALL_BASE_DIR}/envs/${ENV_NAME}_cancer_report --file ${GIT_DIR}/envs/cancer_report.yml
conda env create -p ${INSTALL_BASE_DIR}/envs/${ENV_NAME}_cacao --file ${GIT_DIR}/envs/cacao.yml
conda env create -p ${INSTALL_BASE_DIR}/envs/${ENV_NAME}_gatk4 --file ${GIT_DIR}/envs/gatk4.yml
conda env create -p ${INSTALL_BASE_DIR}/envs/${ENV_NAME}_oviraptor --file ${GIT_DIR}/envs/oviraptor.yml
# PCGR: use conda-locks
bash ${GIT_DIR}/envs/pcgr_install.sh ${INSTALL_BASE_DIR}/envs
# Instead of `conda activate ${INSTALL_BASE_DIR}/envs/${ENV_NAME}`:
ENV_NAME=umccrise
export PATH=${INSTALL_BASE_DIR}/envs/${ENV_NAME}/bin:$PATH
export CONDA_PREFIX=${INSTALL_BASE_DIR}/envs/${GIT_DIR}
# Install master on top
pip install -e ${GIT_DIR}
### Create the loader script
ENV_NAME=umccrise
cat <<EOT > load_umccrise.sh
unset PYTHONPATH
unset PERL5LIB
export PATH=$PATH
export CONDA_PREFIX=${INSTALL_BASE_DIR}/envs/${ENV_NAME}
EOT
# Clean up
conda clean --yes --tarballs