Ipython notebook: Difference between revisions
Jump to navigation
Jump to search
(Created page with "IPython is an interactive Python environment. Coupled with the "notebook" module, it provides a rich web interface. =Launch a notebook= # Connect to the cluster. # Load an e...") |
|||
Line 6: | Line 6: | ||
# Load an environment : | # Load an environment : | ||
#:IPython notebook is available on the cluster in 2 environments : the '''custom build''' and '''CVMFS'''. | #:IPython notebook is available on the cluster in 2 environments : the '''custom build''' and '''CVMFS'''. | ||
#:* To load from CVMFS : | |||
#:*:See [[IceCube_software#CVMFS]] | |||
#:* To load from the custom build '''[deprecated]''' : | #:* To load from the custom build '''[deprecated]''' : | ||
#:*:<pre>source /software/sources/latestEnvironment.source</pre> | #:*:<pre>source /software/sources/latestEnvironment.source</pre> | ||
# Launch a notebook to which you will later connect to from your laptop: | # Launch a notebook to which you will later connect to from your laptop: | ||
#:<pre>ipython notebook --no-browser --pylab inline</pre> | #:<pre>ipython notebook --no-browser --pylab inline</pre> |
Latest revision as of 12:58, 27 March 2017
IPython is an interactive Python environment. Coupled with the "notebook" module, it provides a rich web interface.
Launch a notebook
- Connect to the cluster.
- Load an environment :
- IPython notebook is available on the cluster in 2 environments : the custom build and CVMFS.
- To load from CVMFS :
- To load from the custom build [deprecated] :
source /software/sources/latestEnvironment.source
- IPython notebook is available on the cluster in 2 environments : the custom build and CVMFS.
- Launch a notebook to which you will later connect to from your laptop:
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 [PORT_NUMBER] you need is the number coming after the colon (:).
- The m-machine [M-MACHINE] is the machine where you launched the notebook.
- 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 M-MACHINE.iihe.ac.be
- The tunneled notebook is available in your browser by opening the url : http://localhost:PORT_NUMBER