Jupyter
From FarmShare
m (→building an Ipython notebook environment) |
|||
Line 8: | Line 8: | ||
<source lang="sh"> | <source lang="sh"> | ||
- | mkdir -p / | + | mkdir -p /farmshare/user_data/$USER/ipythontest |
- | cd / | + | cd /farmshare/user_data/$USER/ipythontest |
virtualenv --system-site-packages devbranch | virtualenv --system-site-packages devbranch | ||
- | devbranch/bin/pip install | + | devbranch/bin/pip install --upgrade ipython |
- | + | cp -p /farmshare/software/examples/ipython/audio.ipynb . | |
- | + | ||
- | cp -p / | + | |
</source> | </source> | ||
Line 26: | Line 24: | ||
<source lang="sh"> | <source lang="sh"> | ||
- | [NotebookApp] | + | 2013-12-03 21:39:50.435 [NotebookApp] Created profile dir: u'/afs/ir.stanford.edu/users/b/i/bishopj/.config/ipython/profile_default' |
- | [NotebookApp] Serving notebooks from local directory: / | + | 2013-12-03 21:39:50.465 [NotebookApp] Using MathJax from CDN: http://cdn.mathjax.org/mathjax/latest/MathJax.js |
- | [NotebookApp] The IPython Notebook is running at: http://127.0.0.1:8888/ | + | 2013-12-03 21:39:50.599 [NotebookApp] Serving notebooks from local directory: /srv/zfs01/user_data/bishopj/ipyhtontest |
- | [NotebookApp] Use Control-C to stop this server and shut down all kernels. | + | 2013-12-03 21:39:50.599 [NotebookApp] The IPython Notebook is running at: http://127.0.0.1:8888/ |
+ | 2013-12-03 21:39:50.599 [NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). | ||
+ | |||
</source> | </source> | ||
Revision as of 22:59, 3 December 2013
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 -p /farmshare/user_data/$USER/ipythontest cd /farmshare/user_data/$USER/ipythontest virtualenv --system-site-packages devbranch devbranch/bin/pip install --upgrade ipython cp -p /farmshare/software/examples/ipython/audio.ipynb .
To run Ipython notebook environment, first start it up:
devbranch/bin/ipython notebook --pylab=inline --no-browser
You should see output similar to following:
2013-12-03 21:39:50.435 [NotebookApp] Created profile dir: u'/afs/ir.stanford.edu/users/b/i/bishopj/.config/ipython/profile_default' 2013-12-03 21:39:50.465 [NotebookApp] Using MathJax from CDN: http://cdn.mathjax.org/mathjax/latest/MathJax.js 2013-12-03 21:39:50.599 [NotebookApp] Serving notebooks from local directory: /srv/zfs01/user_data/bishopj/ipyhtontest 2013-12-03 21:39:50.599 [NotebookApp] The IPython Notebook is running at: http://127.0.0.1:8888/ 2013-12-03 21:39:50.599 [NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
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
Now click on Cluster and startup your cluster
Click back on the Notebook tab and you should see an audio notebook. click on this.
Now you can load up a notebook and "play"