-
Notifications
You must be signed in to change notification settings - Fork 1
/
bootstrap_modules.sh
executable file
·55 lines (47 loc) · 1.7 KB
/
bootstrap_modules.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
#!/bin/bash
# Edit this if needed
BOWER=$HOME/node_modules/bower/bin/bower
#################
# Python stuff
echo "Installing Python modules."
pip3 install --user routes gunicorn ppp_core nltk ppp_questionparsing_grammatical
pip3 install --user ppp_datamodel_notation_parser ppp_oeis ppp_oracle ppp_hal
pip3 install --user ppp_natural_math ppp_french_parser
pip3 install --user git+https://github.com/WojciechMula/aspell-python.git
pip3 install --user sympy ply ppp_cas ppp_spell_checker
pip3 install --user git+https://github.com/ProjetPP/ExamplePPPModule-Python.git
pip3 install --user ppp_logger
###################
# QP ML standalone
pip3 install --user ppp_questionparsing_ml_standalone
cd Deployment/
export PPP_ML_STANDALONE_CONFIG=qp_ml_standalone_config.json
DATA_DIR=`/usr/bin/env python3 -c "print(__import__('ppp_questionparsing_ml_standalone.config').config.Config().data_dir)"`
mkdir -p $DATA_DIR
if [ ! -f $DATA_DIR/embeddings-scaled.EMBEDDING_SIZE=25.txt ]
then
wget http://metaoptimize.s3.amazonaws.com/cw-embeddings-ACL2010/embeddings-scaled.EMBEDDING_SIZE=25.txt.gz -c
gzip -d embeddings-scaled.EMBEDDING_SIZE=25.txt.gz
mv -v embeddings-scaled.EMBEDDING_SIZE=25.txt $DATA_DIR
fi
python3 -m ppp_questionparsing_ml_standalone bootstrap
cd ..
##################
# Web UI
echo "Installing WebUI."
git clone https://github.com/ProjetPP/PPP-WebUI.git
cd PPP-WebUI
$BOWER install
cd ..
cp Deployment/webui_config.js PPP-WebUI/config.js
#################
# PHP modules
for module in "Wikidata"
do
echo "Installing $module module."
git clone https://github.com/ProjetPP/PPP-${module}.git
cd PPP-${module}/
curl -sS https://getcomposer.org/installer | php
php composer.phar install
cd ..
done