-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathVagrantfile
70 lines (57 loc) · 1.82 KB
/
Vagrantfile
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "bento/ubuntu-20.04"
config.vm.hostname = "SageVM"
config.vm.synced_folder ".", "/sage"
config.vm.provider "virtualbox" do |vb|
vb.name = "SageVM"
vb.gui = false
vb.memory = "4096"
vb.cpus = "2"
end
config.vm.provision "deps", type: "shell", privileged: false, inline: <<-SHELL
sudo apt-get update
sudo apt-get install -y \
build-essential \
python3-pip \
clang-format \
libsqlite3-dev \
libpcap-dev \
libnetfilter-queue-dev \
git
SHELL
config.vm.provision "pydeps", type: "shell", privileged: false, inline: <<-SHELL
pip3 install --no-cache-dir \
tabulate \
tqdm \
torch \
termcolor \
networkx \
matplotlib \
pydot \
nltk \
stanfordcorenlp \
"spacy >=2.2,<3"
SHELL
config.vm.provision "spacy", type: "shell", privileged: false, inline: <<-SHELL
python3 -m spacy download en
SHELL
config.vm.provision "neuralcoref", type: "shell", privileged: false, inline: <<-SHELL
git clone --depth 1 https://github.com/huggingface/neuralcoref.git
cd neuralcoref
pip3 install -r requirements.txt
pip3 install -e .
SHELL
config.vm.provision "nltk", type: "shell", privileged: false, inline: <<-SHELL
sed -i \
"s/for edge in self.select(start=0, end=self._num_leaves, lhs=root):/for edge in self.select(start=0, end=self._num_leaves):/" \
~/.local/lib/python3.*/site-packages/nltk/parse/chart.py
SHELL
config.vm.provision "clean", type: "shell", privileged: false, inline: <<-SHELL
sudo apt-get clean
SHELL
config.vm.provision "link", type: "shell", privileged: false, inline: <<-SHELL
ln -s /sage ~/sage
SHELL
end