forked from fermiPy/fermipy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcondainstall.sh
67 lines (53 loc) · 1.4 KB
/
condainstall.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
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/usr/bin/env bash
if [[ -z $PYTHON_VERSION ]]; then
PYTHON_VERSION=2.7
fi
if [[ -z $CONDA_DOWNLOAD ]]; then
if [[ `uname` == "Darwin" ]]; then
echo "Detected Mac OS X..."
CONDA_DOWNLOAD=Miniconda3-latest-MacOSX-x86_64.sh
else
echo "Detected Linux..."
CONDA_DOWNLOAD=Miniconda3-latest-Linux-x86_64.sh
fi
fi
if [[ -z $CONDA_DEPS ]]; then
CONDA_DEPS='scipy matplotlib pyyaml ipython numpy astropy'
fi
if [[ -z $CONDA2 ]]; then
CONDA2='conda install -y healpy subprocess32 fermipy jupyter'
fi
if [[ -z $CONDA_PATH ]]; then
CONDA_PATH=$HOME/miniconda
fi
if [ ! -d "$CONDA_PATH/bin" ]; then
echo Creating a new conda installation under $CONDA_PATH
curl -o miniconda.sh -L http://repo.continuum.io/miniconda/$CONDA_DOWNLOAD
bash miniconda.sh -b -p $CONDA_PATH
rc=$?
rm -f miniconda.sh
if [[ $rc != 0 ]]; then
exit $rc
fi
else
echo "Using existing conda installation under $CONDA_PATH"
fi
export PATH="$CONDA_PATH/bin:$PATH"
if [[ -n $ST_INSTALL ]]; then
$ST_INSTALL
fi
conda update -q conda -y
conda config --add channels conda-forge
conda config --add channels conda-forge/label/cf201901
conda info -a
conda install -y python=$PYTHON_VERSION pip pytest $CONDA_DEPS
if [[ -n $CONDA2 ]]; then
$CONDA2
fi
if [[ -n $PIP_DEPS ]]; then
python -m pip install $PIP_DEPS
fi
source condasetup.sh
if [[ -n $INSTALL_CMD ]]; then
$INSTALL_CMD
fi