-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·65 lines (55 loc) · 1.44 KB
/
setup.sh
File metadata and controls
executable file
·65 lines (55 loc) · 1.44 KB
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
#!/bin/bash
#
skipvenv=0
while :; do
case $1 in
-s|--skipvenv)
skipvenv=1
;;
--) # End of all options.
shift
break
;;
-?*)
printf 'WARN: Unknown option (ignored): %s\n' "$1" >&2
;;
*) # Default case: No more options, so break out of the loop.
break
esac
shift
done
set -eu
# accounts for setup.sh not called from basedir
export BASEDIR="$(cd "$(dirname ${BASH_SOURCE[0]})" ; pwd -P )"
cd ${BASEDIR}
git submodule update --init --recursive
if [[ ${skipvenv} == 0 ]] ; then
# initialize the virtualenv
python3 -m venv venv
source venv/bin/activate
fi
# install python dependencies into the virtualenv
pip install --upgrade pip
pip install $(grep Cython requirements.txt)
pip install -r requirements.txt
# install local pymor and pdeopt version
cd "${BASEDIR}"
cd pymor && pip install -e .
cd "${BASEDIR}"
cd perturbations-for-2d-data && pip install -e .
cd "${BASEDIR}"
cd gridlod && pip install -e .
cd "${BASEDIR}"
cd rblod && pip install -e .
cd "${BASEDIR}"
echo $PWD/ > $(python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())')/scripts.pth
pip install scikit-sparse
cd "${BASEDIR}"
echo
if [[ ${skipvenv} == 0 ]] ; then
echo "All done! From now on run"
echo " source venv/bin/activate"
echo "to activate the virtualenv!"
else
echo "All done!"
fi