-
Notifications
You must be signed in to change notification settings - Fork 3
/
Vagrantfile
69 lines (57 loc) · 2.36 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
$script = <<EOF
set -e
apt-get update -q
apt-get install -yq software-properties-common
add-apt-repository ppa:webupd8team/java
echo "deb https://dl.bintray.com/sbt/debian /" | tee -a /etc/apt/sources.list.d/sbt.list
echo "deb http://cran.rstudio.com/bin/linux/ubuntu trusty/" | tee -a /etc/apt/sources.list.d/r.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 642AC823
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
gpg -a --export E084DAB9 | sudo apt-key add -
apt-get update -q
echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
apt-get install -yq oracle-java8-installer sbt unzip r-base ghostscript build-essential
wget -q http://www.scala-lang.org/files/archive/scala-2.11.7.deb
dpkg -i scala-2.11.7.deb
rm scala-2.11.7.deb
wget -O datalog.tar.gz https://sourceforge.net/projects/datalog/files/datalog/2.6/datalog-2.6.tar.gz/download
tar xzf datalog.tar.gz
cd datalog-2.6
./configure
sed -i "s/-DHAVE_LIBREADLINE=1//g" Makefile
make
make install
cd ..
rm -rf datalog-2.6
rm datalog.tar.gz
EOF
$userscript = <<EOF
cd /home/vagrant
ZIPFILE=z3-4.4.1-x64-ubuntu-14.04.zip
URL=https://github.com/Z3Prover/z3/releases/download/z3-4.4.1/$ZIPFILE
wget $URL
unzip $ZIPFILE
mv z3-4.4.1-x64-ubuntu-14.04 z3
echo 'PATH=/home/vagrant/z3/bin:$PATH' >> .profile
mkdir -p /home/vagrant/R/x86_64-pc-linux-gnu-library/3.2
R -e 'install.packages("ggplot2", repos="http://cran.us.r-project.org")'
R -e 'install.packages("sitools", repos="http://cran.us.r-project.org")'
R -e 'install.packages("scales", repos="http://cran.us.r-project.org")'
R -e 'install.packages("plyr", repos="http://cran.us.r-project.org")'
R -e 'install.packages("dplyr", repos="http://cran.us.r-project.org")'
R -e 'install.packages("grid", repos="http://cran.us.r-project.org")'
R -e 'install.packages("fontcm", repos="http://cran.us.r-project.org")'
R -e 'install.packages("extrafont", repos="http://cran.us.r-project.org")'
R -e 'library(extrafont); font_install("fontcm")'
EOF
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.ssh.forward_x11 = false
config.vm.synced_folder ".", "/vagrant"
config.vm.provision "shell", inline: $script, privileged: true
config.vm.provision "shell", inline: $userscript, privileged: false
config.vm.provider :virtualbox do |vb|
vb.gui = false
vb.customize ["modifyvm", :id, "--memory", "4096"]
end
end