Jupyter

From FarmShare

(Difference between revisions)
Jump to: navigation, search
Line 8: Line 8:
<source lang="sh">
<source lang="sh">
-
mkdir /mnt/glusterfs/$USER/Ipython
+
mkdir /tmp/$USER/Ipython
-
cd /mnt/glusterfs/$USER/Ipython
+
cd /tmp/$USER/Ipython
virtualenv --system-site-packages devbranch
virtualenv --system-site-packages devbranch
devbranch/bin/pip install https://github.com/ipython/ipython/tarball/master
devbranch/bin/pip install https://github.com/ipython/ipython/tarball/master
Line 26: Line 26:
<source lang="sh">
<source lang="sh">
[NotebookApp] Using existing profile dir: u'/afs/ir.stanford.edu/users/b/i/bishopj/.config/ipython/profile_default'
[NotebookApp] Using existing profile dir: u'/afs/ir.stanford.edu/users/b/i/bishopj/.config/ipython/profile_default'
-
[NotebookApp] Serving notebooks from local directory: /mnt/glusterfs/bishopj/ipython
+
[NotebookApp] Serving notebooks from local directory: /tmp/bishopj/ipython
[NotebookApp] The IPython Notebook is running at: http://127.0.0.1:8888/
[NotebookApp] The IPython Notebook is running at: http://127.0.0.1:8888/
[NotebookApp] Use Control-C to stop this server and shut down all kernels.
[NotebookApp] Use Control-C to stop this server and shut down all kernels.
Line 38: Line 38:
-
You should see [[Image:notebooks1.png|600px]]
+
You should see [[Image:notebooks1.png|800px]]
-
Now click on Cluster and startup your cluster [[Image:notebooks2.png|600px]]
+
Now click on Cluster and startup your cluster [[Image:notebooks2.png|800px]]
-
Now you can load up a notebook an "play"  [[Image:notebooka1.png|600px]]
+
Click back on the '''Notebook''' tab and you should see an '''audio''' notebook.  click on this.
 +
[[Image:notebooks1.png|800px]]
 +
 
 +
Now you can load up a notebook and "play"  [[Image:notebooka1.png|00px]]

Revision as of 12:55, 24 October 2012

Ipython

Ipython provides both a command line and browser based (notebook) interfaces. The development is quite fast, so the distribution provided packages tend to lag behind enough it makes sense to setup a python environment which incorporates the latest updates.

building an Ipython notebook environment

Login to a corn and make yourself an Ipython environment in glusterfs

mkdir /tmp/$USER/Ipython
cd /tmp/$USER/Ipython
virtualenv --system-site-packages devbranch
devbranch/bin/pip install https://github.com/ipython/ipython/tarball/master
devbranch/bin/pip install tornado
devbranch/bin/pip install pyzmq

To run Ipython notebook environment, first start it up:

devbranch/bin/ipython notebook --pylab=inline --no-browser

You should see output similar to following:

[NotebookApp] Using existing profile dir: u'/afs/ir.stanford.edu/users/b/i/bishopj/.config/ipython/profile_default'
[NotebookApp] Serving notebooks from local directory: /tmp/bishopj/ipython
[NotebookApp] The IPython Notebook is running at: http://127.0.0.1:8888/
[NotebookApp] Use Control-C to stop this server and shut down all kernels.

Setup an ssh tunnel from your desktop system to the same corn system you ran the notebook on in previous step. In my case port 8888 and corn02.

ssh -L 8888:localhost:8888 corn02


You should see Notebooks1.png

Now click on Cluster and startup your cluster Notebooks2.png

Click back on the Notebook tab and you should see an audio notebook. click on this. Notebooks1.png

Now you can load up a notebook and "play" 00px

Personal tools
Toolbox
LANGUAGES