Jupyter (aka IPython Notebook) Vagrantfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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