-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.sh
executable file
·41 lines (36 loc) · 1.01 KB
/
setup.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
#!/bin/bash
#
# ~~~
# This file is part of the paper:
#
# "A NON-CONFORMING DUAL APPROACH FOR ADAPTIVE TRUST-REGION REDUCED BASIS
# APPROXIMATION OF PDE-CONSTRAINED OPTIMIZATION"
#
# https://github.com/TiKeil/NCD-corrected-TR-RB-approach-for-pde-opt
#
# Copyright 2019-2020 all developers. All rights reserved.
# License: Licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
# Authors:
# Felix Schindler (2020)
# Tim Keil (2020)
# ~~~
set -e
# initialize the virtualenv
export BASEDIR="${PWD}"
virtualenv --python=python3 venv
source venv/bin/activate
# install python dependencies into the virtualenv
cd "${BASEDIR}"
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 pdeopt && pip install -e .
cd "${BASEDIR}"
echo
echo "All done! From now on run"
echo " source venv/bin/activate"
echo "to activate the virtualenv!"