Last active
December 17, 2015 06:39
-
-
Save cameronneylon/5566750 to your computer and use it in GitHub Desktop.
Shell script for provisioning a Vagrant VM instance running iPython notebook.
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
# Provisioning script for a Vagrant VM running iPythonNotebook | |
# Obtain curl and install setuptools and pip | |
apt-get update | |
apt-get -y install python-setuptools | |
easy_install pip | |
# Get ipython and dependencies | |
echo | |
echo Installing iPython and dependencies... | |
echo | |
pip install scipy | |
apt-get -y install python-matplotlib | |
apt-get -y install ipython-notebook -t precise-backports | |
# Uncomment the line that starts "# iptest" to run the ipython test suite | |
# One test is known to fail when run from root, the following command | |
# skips that single test. For some reason this doesn't work when installing | |
# iPython via apt-get | |
# | |
# iptest -q -e test_not_writable_ipdir | |
# Runup the notebook starting in the synced directory | |
cd /vagrant | |
echo | |
echo Starting the iPython Notebook | |
echo | |
# Notebook process needs to daemonized. Code here is borrowed from | |
# https://github.com/mitchellh/vagrant/issues/1553#issuecomment-16235753 | |
nohup ipython notebook --ip=192.168.33.10 0<&- &>/dev/null & | |
echo | |
echo If no were errors reported your iPython notebook should be available at | |
echo http://192.168.33.10:8888 from your local browser | |
echo | |
echo Returning control to your local terminal. To reach the virtual machine | |
echo issue the command "vagrant ssh" from your command prompt. | |
echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment