This repository has been archived by the owner on Oct 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathinstall-ubuntu.sh
76 lines (63 loc) · 1.72 KB
/
install-ubuntu.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
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
#!/bin/bash
NODE_VERSION=0.11.14
sudo apt-get update
# install prereqisites
echo 'Installing prerequisites ...'
sudo apt-get install python2.7
sudo apt-get install git
sudo apt-get install mysql-server
sudo apt-get install uuid-dev
sudo apt-get install libopenblas-dev
sudo apt-get install liblapacke
sudo apt-get install liblapacke-dev
sudo apt-get install curl
sudo apt-get install build-essential
sudo apt-get install libssl-dev
# install NVM
echo 'Installing NVM ...'
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.26.1/install.sh | bash
# load NVM
CURR_DIR=`pwd`
cd ~
export NVM_DIR=`pwd`/.nvm
NVM_FILE=$NVM_DIR/nvm.sh
echo 'NVM file: '$NVM_FILE
if [ -s $NVM_FILE ]; then
echo 'Loading NVM ...'
. $NVM_FILE # This loads nvm
else
echo 'NVM not installed, please contact the system administrator!'
exit 1
fi
cd $CURR_DIR
# install Node.js
echo 'Installing node ...'
nvm install $NODE_VERSION
nvm use $NODE_VERSION
nvm alias default $NODE_VERSION
# install node-gyp
npm update
echo 'Installing node-gyp ...'
npm install -g node-gyp
# clone qminer and StreamStory
echo 'Cloning QMiner and StreamStory ...'
git clone https://github.com/lstopar/qminer.git
git clone https://github.com/JozefStefanInstitute/StreamStory.git
# build qminer
echo 'Building qminer ...'
cd qminer
echo 'Fetching dependencies ...'
npm install
echo 'Building ...'
node-gyp clean && node-gyp configure -- -DLIN_ALG_BLAS=BLAS -DLIN_ALG_LAPACKE=LAPACKE -DLIN_ALG_LIB=-llapacke
node-gyp --verbose build
cd ..
# install StreamStory dependencies and create the database
cd StreamStory
echo 'Fetching StreamStory dependencies ...'
npm install
echo 'Creating database ...'
echo 'Please enter MySQL root password:'
cat init.sql | mysql -u root -p
cd ..
echo 'Done!'