Skip to content

Instantly share code, notes, and snippets.

@bennylope
Forked from pansen/Vagrantfile
Created May 1, 2016 13:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bennylope/11afe5c05b200aea400f62f6ebf06ec2 to your computer and use it in GitHub Desktop.
Save bennylope/11afe5c05b200aea400f62f6ebf06ec2 to your computer and use it in GitHub Desktop.
Jupyter (aka IPython Notebook) Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "forwarded_port", guest: 8888, host: 8888
config.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
end
config.vm.provision "shell", inline: <<-SHELL
sudo add-apt-repository ppa:fkrull/deadsnakes -y
sudo apt-get update
sudo apt-get install -y python3.5 python3.5-dev libncurses5-dev \
python-dev python-pip python3-pip python3-dev \
python3-matplotlib python3-scipy python3-numpy python3-pandas \
python3-psycopg2 libpq-dev
# sudo mv /usr/bin/python3 /usr/bin/python3-old
# sudo ln -sfn /usr/bin/python3.5 /usr/bin/python3
wget https://bootstrap.pypa.io/get-pip.py
sudo python3 get-pip.py
sudo pip3 install setuptools --upgrade
sudo pip3 install --upgrade ipython[all] jupyter[all] jupyter_core jinja2 \
zmq tornado jsonschema pandas ipython-sql psycopg2
sudo mkdir -p /vagrant/notebook
SHELL
config.vm.provision "shell", run: "always", inline: <<-SHELL
killall ipython3
sleep 3
ipython3 notebook --notebook-dir=/vagrant/notebook --no-browser --ip=0.0.0.0 &
SHELL
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment