Wiki
Clone wikiCS5220-S14 / ipython-notebook
Running an IPython notebook server on C4
The IPython notebook is a web-based interface to Python that allows a mix of code and text, much like notebooks in systems like Mathematica. It includes built-in support for tasks like starting and stopping clusters, supports inline graphics sent directly to the web browser, and is pretty generally awesome. And you can use it to interact with C4! Follow these steps:
- Load the
anaconda
module before doing anything else. - Log into C4 and run the
setup_ipython_nbserver.sh
script (available from the/share/cs-instructional/cs5220/script
subdirectory). This script takes one argument, the port on which you want your notebook server to live. I recomment choosing something between 7000 and 9000 at random. At the end of this script, you will have a new Python profile. - Once you have created the
nbserver
profile, runipython notebook --profile=nbserver
to start the notebook server. - Create an ssh tunnel to connect a port on your local host to
the port used by the notebook server. For example, if the notebook
server ran on port 7777, I might run
ssh -N -L 8000:localhost:7777 c4
, which forwards port 7777 on C4 to port 8000 on the localhost. You will need to set up such a tunnel, because the head node is configured to block access to most ports by default for security. - Point a web browser to
http://localhost:8000/
, enter your password, and go to town.
Updated