IPython notebook: Difference between revisions

From IIHE Wiki
Jump to navigationJump to search
No edit summary
Line 6: Line 6:


* To load from the custom build [deprecated] :
* To load from the custom build [deprecated] :
<pre>source /software/sources/latestEnvironment</pre>
<pre>source /software/sources/latestEnvironment.source</pre>


* To load from CVMFS :
* To load from CVMFS :
Line 12: Line 12:


=Launch a notebook=
=Launch a notebook=
When launching the notebook, the system will create a dedicated server listening to localhost (default) running on a specific port.


Launch the notebook (it will choose an available port)
first, connect to the cluster.
<pre>ipython notebook --no-browser --pylab inline</pre>
Set the correct environment and launch a notebook to which you will later connect to from your laptop:


Create a tunnel from your machine (see output of previous command for PORT_NUMBER)
<pre>
source /software/sources/latestEnvironment.source
ipython notebook --no-browser --pylab inline</pre>
 
 
When launching the notebook, the system will create a dedicated server for you. It will be running on a specific port chosen by the notebook itself.
The launcher reports this port in the following way:
<pre>
The IPython Notebook is running at: http://127.0.0.1:8888/
</pre>
The port number you need it the number coming after the colon (:).
 
Now, open a new terminal on your laptop and create a tunnel to the machine where you instantiated the notebook. Fill in the correct port number in the following command:


<pre>ssh -L PORT_NUMBER:localhost:PORT_NUMBER uixx.iihe.ac.be</pre>
<pre>ssh -L PORT_NUMBER:localhost:PORT_NUMBER uixx.iihe.ac.be</pre>


Open the tunnelled notebook in your browser by opening the url : http://localhost:PORT_NUMBER
The tunnelled notebook is available in your browser by opening the url : http://localhost:PORT_NUMBER


=Links=
=Links=
http://ipython.org/
http://ipython.org/

Revision as of 12:25, 5 October 2016

IPython is an interactive Python environment. Coupled with the "notebook" module, it provides a rich web interface.


Where is it

IPython notebook is available on the cluster in 2 environments : the custom build and CVMFS.

  • To load from the custom build [deprecated] :
source /software/sources/latestEnvironment.source
  • To load from CVMFS :

See IceCube Software Cluster#CVMFS

Launch a notebook

first, connect to the cluster. Set the correct environment and launch a notebook to which you will later connect to from your laptop:

source /software/sources/latestEnvironment.source
ipython notebook --no-browser --pylab inline


When launching the notebook, the system will create a dedicated server for you. It will be running on a specific port chosen by the notebook itself. The launcher reports this port in the following way:

The IPython Notebook is running at: http://127.0.0.1:8888/

The port number you need it the number coming after the colon (:).

Now, open a new terminal on your laptop and create a tunnel to the machine where you instantiated the notebook. Fill in the correct port number in the following command:

ssh -L PORT_NUMBER:localhost:PORT_NUMBER uixx.iihe.ac.be

The tunnelled notebook is available in your browser by opening the url : http://localhost:PORT_NUMBER

Links

http://ipython.org/