-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
36 lines (35 loc) · 1.41 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "boxcutter/ubuntu1510"
config.vm.box_download_insecure = true
config.vm.network "forwarded_port", guest: 8888, host: 8888
# set up port forwarding so that ipython/jupyter notebooks are accessible from the host machine.
# Note that this binds to 8080 on the host, so can only be run once.
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.provision "shell", inline: <<-SHELL
anaconda=Anaconda-2.2.0-Linux-x86.sh
cd /vagrant
echo -e "\n\nDownloading Anaconda installer. This may take more than a few minutes."
wget -q -o /dev/null - https://3230d63b5fc54e62148e-c95ac804525aac4b6dba79b00b39d1d3.ssl.cf1.rackcdn.com/Anaconda3-2.4.1-Linux-x86_64.sh
# old version wget -q -o /dev/null - https://3230d63b5fc54e62148e-c95ac804525aac4b6dba79b00b39d1d3.ssl.cf1.rackcdn.com/Anaconda-2.2.0-Linux-x86.sh
if [ -s $anaconda ]
then
chmod +x $anaconda
./$anaconda -b -p /opt/anaconda
cat >> /home/vagrant/.bashrc << END
# For anaconda
PATH=/opt/anaconda/bin:$PATH
# add PCL certs to anaconda's certfile.
cat /vagrant/*cer >> opt/anaconda/lib/python3.5/site-packages/requests/cacert.pem
# install notebooks
conda install -c r r-essentials
conda install jupyter
END
else
echo "ERROR: Anaconda installer is not found"
fi
# attempt to start ipython server bound to
ipython notebook ––ip=0.0.0.0
SHELL
end