|
| 1 | +set -v |
| 2 | +set -e |
| 3 | + |
| 4 | +# This is set in travis |
| 5 | +if [[ x$PYTHON_VERSION == x ]]; then |
| 6 | + PYTHON_VERSION=3.9 |
| 7 | +fi |
| 8 | + |
| 9 | + |
| 10 | +echo " |
| 11 | +# GMSC-Mapper |
| 12 | +AUTHORS: Yiqian Duan, Celio Dias Santos Junior, Luis Pedro Coelho |
| 13 | +" |
| 14 | + |
| 15 | +if ! which conda > /dev/null; then |
| 16 | + echo "[ Conda not found. Please install miniconda and add 'conda' to the PATH: " |
| 17 | + echo " curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh" |
| 18 | + echo " sh Miniconda3-latest-Linux-x86_64.sh" |
| 19 | + exit 1 |
| 20 | +fi |
| 21 | + |
| 22 | +eval "$(conda shell.bash hook)" |
| 23 | + |
| 24 | +BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" |
| 25 | + |
| 26 | + |
| 27 | +echo "# Creating new environment for GMSC-mapper" |
| 28 | +mkdir -p envs |
| 29 | + |
| 30 | +conda config --env --add channels defaults |
| 31 | +conda config --env --add channels bioconda |
| 32 | +conda config --env --add channels conda-forge |
| 33 | + |
| 34 | +if ! which mamba > /dev/null; then |
| 35 | + CONDA_INSTALL_CMD=conda |
| 36 | +else |
| 37 | + echo "# Installing packages with MAMBA" |
| 38 | + CONDA_INSTALL_CMD=mamba |
| 39 | +fi |
| 40 | + |
| 41 | +${CONDA_INSTALL_CMD} env create \ |
| 42 | + -p $BASEDIR/envs/gmscmapper \ |
| 43 | + -f $BASEDIR/environment.yml |
| 44 | + |
| 45 | +# only activate AFTER install all the packages to get the right environmental variables |
| 46 | +source activate $BASEDIR/envs/gmscmapper |
| 47 | +python3 $BASEDIR/setup.py install |
| 48 | +bash $BASEDIR/tests.sh |
| 49 | + |
| 50 | +echo "############ Installation procedures finished |
| 51 | +****** Thank you for installing GMSC-Mapper ******** |
| 52 | +--- Please submit bugreports/comments to |
| 53 | +https://github.com/BigDataBiology/GMSC-mapper/issues" |
| 54 | + |
0 commit comments