-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathinstall.sh
54 lines (40 loc) · 1.39 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
set -v
set -e
# This is set in travis
if [[ x$PYTHON_VERSION == x ]]; then
PYTHON_VERSION=3.9
fi
echo "
# GMSC-Mapper
AUTHORS: Yiqian Duan, Celio Dias Santos Junior, Luis Pedro Coelho
"
if ! which conda > /dev/null; then
echo "[ Conda not found. Please install miniconda and add 'conda' to the PATH: "
echo " curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh"
echo " sh Miniconda3-latest-Linux-x86_64.sh"
exit 1
fi
eval "$(conda shell.bash hook)"
BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
echo "# Creating new environment for GMSC-mapper"
mkdir -p envs
conda config --env --add channels defaults
conda config --env --add channels bioconda
conda config --env --add channels conda-forge
if ! which mamba > /dev/null; then
CONDA_INSTALL_CMD=conda
else
echo "# Installing packages with MAMBA"
CONDA_INSTALL_CMD=mamba
fi
${CONDA_INSTALL_CMD} env create \
-p $BASEDIR/envs/gmscmapper \
-f $BASEDIR/environment.yml
# only activate AFTER install all the packages to get the right environmental variables
source activate $BASEDIR/envs/gmscmapper
python3 $BASEDIR/setup.py install
bash $BASEDIR/tests.sh
echo "############ Installation procedures finished
****** Thank you for installing GMSC-Mapper ********
--- Please submit bugreports/comments to
https://github.com/BigDataBiology/GMSC-mapper/issues"