-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.sh
36 lines (28 loc) · 1.47 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
#!/bin/bash
# Ensure root
if [[ "$(whoami)" != "root" ]]; then
echo "This script must be run as root"
exit 1
fi
# Add repos and download using apt
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' | sudo tee /etc/apt/sources.list.d/google-chrome.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get update
sudo apt-get install -y uwsgi python-dev uwsgi-plugin-python python-pip default-jre nginx nodejs mongodb-org-server google-chrome-stable g++ make unzip
# Install boilerpipe
git clone https://github.com/misja/python-boilerpipe.git /tmp/python-boilerpipe
# Save directory so we an climb back
olddir=$(pwd)
pip install -r /tmp/python-boilerpipe/requirements.txt
cd /tmp/python-boilerpipe/ && python /tmp/python-boilerpipe/setup.py install
cd $olddir
rm -rf /tmp/python-boilerpipe
wget https://chromedriver.storage.googleapis.com/2.37/chromedriver_linux64.zip -P /tmp
unzip /tmp/chromedriver_linux64.zip -d /bin
rm /tmp/chromedriver_linux64.zip
pip install -r requirements.txt
# Install punkt
python -c 'import nltk; nltk.download("punkt", download_dir="/usr/local/share/nltk_data")'