-
Notifications
You must be signed in to change notification settings - Fork 1
/
install
executable file
·108 lines (95 loc) · 3 KB
/
install
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#!/bin/bash
# Do NOT run this install with sudo!
# Just run ./install from the home directory in PAF
echo "Starting PAF setup - Please be patience!"
#Generic dependencies
sudo apt-get -y update
sudo apt-get -y install curl wget unzip software-properties-common
#Python repo
sudo add-apt-repository -y ppa:deadsnakes/ppa
sudo apt-get -y update
mkdir -p ./tmp
if command -v python3.7
then
echo "Ok - python3.7 exists"
sudo apt-get -y install lzma python3.7-tk tk-dev liblzma-dev libbz2-dev
else
echo "Installing python3.7"
#Python3 dependencies, I want to install them before I install python3.7
sudo apt-get -y install python3.7
sudo apt-get -y install python3-pip python3.7-dev
sudo apt-get -y install lzma python3.7-tk tk-dev liblzma-dev libbz2-dev
echo "python3.7 installed!"
fi
#Generic dependencies common to Gelpia and dreal
sudo apt-get install -y libgmp-dev libmpfr-dev libmpc-dev
sudo apt-get install -y flex bison
echo "Installing Python3.7 packages..."
python3.7 -m pip install --user numpy
python3.7 -m pip install --user scipy
python3.7 -m pip install --user sympy
python3.7 -m pip install --user matplotlib
python3.7 -m pip install --user pacal
python3.7 -m pip install --user ply
python3.7 -m pip install --user --upgrade Pillow
python3.7 -m pip install --user pychebfun
python3.7 -m pip install --user sly
python3.7 -m pip install --user gmpy2
python3.7 -m pip install --user psutil
python3.7 -m pip install --user statsmodels
echo "Done with packages!"
if python3.7 ./tmp/gelpia/bin/gelpia.py --function "0; " &> /dev/null
then
echo "Ok - Gelpia exists"
else
echo "Installing Gelpia..."
git clone https://github.com/soarlab/gelpia.git ./tmp/gelpia
cd ./tmp/gelpia
make requirements
make
cd ../../
echo "Done with Gelpia!"
fi
if python3.7 ./tmp/gelpia_constraints/bin/gelpia.py --function "0; " &> /dev/null
then
echo "Ok - Gelpia Constraints exists"
else
echo "Installing Gelpia Constraints..."
git clone https://github.com/soarlab/gelpia.git ./tmp/gelpia_constraints
cd ./tmp/gelpia_constraints
git checkout constraints
git pull
make requirements
make
cd ../../
echo "Done with Gelpia Constraints!"
fi
if command -v z3 &> /dev/null
then
echo "Ok - z3 exists"
else
echo "Installing Z3..."
cd ./tmp
wget https://github.com/Z3Prover/z3/releases/download/z3-4.8.9/z3-4.8.9-x64-ubuntu-16.04.zip
unzip -u z3-4.8.9-x64-ubuntu-16.04.zip
sudo cp z3-4.8.9-x64-ubuntu-16.04/bin/z3 /usr/bin/
cd ../
echo "Done with z3!"
fi
if command -v dreal &> /dev/null
then
echo "Ok - dreal exists"
else
echo "Installing dreal..."
sudo add-apt-repository -y ppa:dreal/dreal
sudo apt-get -y update
sudo apt-get -y install coinor-libclp-dev g++ libfl-dev libgmp-dev libibex-dev libnlopt-dev pkg-config zlib1g-dev libpython3-dev
cd ./tmp
wget https://github.com/dreal/dreal4/releases/download/4.20.12.1/dreal_4.20.12.1_amd64.deb
sudo dpkg -i dreal_4.20.12.1_amd64.deb
sudo apt-get install -y -f
sudo cp /opt/dreal/4.20.12.1/bin/dreal /usr/bin/
echo "Done with dreal!"
cd ../
fi
echo "Done with requirements!"