| 1 |
# Temporarily change directory to $HOME to install software |
| 2 |
pushd . |
| 3 |
cd $HOME |
| 4 |
|
| 5 |
# Install Miniconda |
| 6 |
MINICONDA=Miniconda3-latest-Linux-x86_64.sh |
| 7 |
# Sed cuts out everything before the first digit, then traps the first digit and everything after |
| 8 |
MINICONDA_HOME=$HOME/miniconda |
| 9 |
MINICONDA_MD5=$(curl -s https://repo.continuum.io/miniconda/ | grep -A3 $MINICONDA | sed -n '4p' | sed -n 's/ *<td>\(.*\)<\/td> */\1/p') |
| 10 |
wget -q https://repo.continuum.io/miniconda/$MINICONDA |
| 11 |
if [[ $MINICONDA_MD5 != $(md5sum $MINICONDA | cut -d ' ' -f 1) ]]; then |
| 12 |
echo "Miniconda MD5 mismatch" |
| 13 |
exit 1 |
| 14 |
fi |
| 15 |
|
| 16 |
bash $MINICONDA -b -p $MINICONDA_HOME |
| 17 |
|
| 18 |
# Configure miniconda |
| 19 |
export PIP_ARGS="-U" |
| 20 |
export PATH=$MINICONDA_HOME/bin:$PATH |
| 21 |
conda update --yes conda |
| 22 |
conda install --yes conda-build jinja2 anaconda-client pip |
| 23 |
|
| 24 |
# Restore original directory |
| 25 |
popd |