-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall
More file actions
32 lines (25 loc) · 769 Bytes
/
install
File metadata and controls
32 lines (25 loc) · 769 Bytes
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
#!/bin/bash
function set_script_dir() {
local ORIG_DIR="$(pwd)" || return 1
local REL_SCRIPT_DIR="$(dirname ${BASH_SOURCE[0]})" || return 1
cd "${REL_SCRIPT_DIR}" || return 1
SCRIPT_DIR="$(pwd)" || return 1
cd "${ORIG_DIR}" || return 1
}
function install_conda() {
conda create --prefix "${CONDA_ENV_PREFIX}" || return 1
conda activate "${CONDA_ENV_PREFIX}" || return 1
conda install -c conda-forge mamba || return 1
mamba install -c conda-forge -c bioconda --file \
"${SCRIPT_DIR}/conda_requirements.txt" || return 1
conda deactivate || return 1
}
function install() {
install_conda || return 1
}
function main() {
set_script_dir || return 1
source "${SCRIPT_DIR}/set_env_vars.sh" || return 1
install || return 1
}
main "$@"