-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·34 lines (29 loc) · 1016 Bytes
/
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
#!/bin/bash -e
# This script installs software and sets up the Conda environment.
# Find platform
if [ "$(uname)" = Darwin ] && [ "$(uname -m)" = x86_64 ]
then
MINICONDA_INSTALL_SH=Miniconda3-4.7.10-MacOSX-x86_64.sh
SPEC_FILE=env/osx-64-spec.txt
elif [ "$(uname)" = Linux ] && [ "$(uname -m)" = x86_64 ]
then
MINICONDA_INSTALL_SH=Miniconda3-4.7.10-Linux-x86_64.sh
SPEC_FILE=env/linux-64-spec.txt
else
echo Unsupported platform.
exit 1
fi
MINICONDA_INSTALL_DIR=.miniconda3
if [ -d $MINICONDA_INSTALL_DIR ] && [ -d src ]
then
# Re-activate environment
source "$MINICONDA_INSTALL_DIR/bin/activate" inteq
else
# Install miniconda
curl -O https://repo.continuum.io/miniconda/$MINICONDA_INSTALL_SH
bash $MINICONDA_INSTALL_SH -b -p "$MINICONDA_INSTALL_DIR"
# Install software
PATH="$MINICONDA_INSTALL_DIR/bin:$PATH" conda create --yes --name inteq --file ${SPEC_FILE}
source "$MINICONDA_INSTALL_DIR/bin/activate" inteq
pip install -r env/requirements.txt
fi