other:uvcdat:cdat_conda:ipnb
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
other:uvcdat:cdat_conda:ipnb [2019/05/15 11:57] – Started How does it work jypeter | other:uvcdat:cdat_conda:ipnb [2019/05/15 23:48] – Saved temps notes jypeter | ||
---|---|---|---|
Line 29: | Line 29: | ||
* you will use an ipython interpreter | * you will use an ipython interpreter | ||
* in a web browser (rather than a terminal) | * in a web browser (rather than a terminal) | ||
+ | * a notebook is the content of the web page where you have interacted with python. You can save it ('' | ||
===== How does it work? ===== | ===== How does it work? ===== | ||
Line 35: | Line 36: | ||
- determine if you will use python on your local computer or a remote computer and //go// to that computer | - determine if you will use python on your local computer or a remote computer and //go// to that computer | ||
- | * this mostly depends on the data you need to work. The idea is to move the computation near the data, not to move/ | + | * the selected computer |
- | - choose/ | + | - choose/ |
+ | * e.g. you can [[other: | ||
+ | - start the ipython notebook server with the appropriate parameters (on the selected computer, with the selected python) | ||
+ | * this will start a temporary web server that you can connect to, in order to use the notebooks | ||
+ | * the server will display the URL that you have to use. The URL has an authentication token and only you (or the person who has a copy of the full URL) can connect to your server | ||
+ | * the basic way to start a server is to just type '' | ||
+ | * the '' | ||
+ | * if you have to work on a remote computer, the idea is to start the ipython server on the remote computer and use a web browser on your local computer (thanks to an //ssh tunnel//) | ||
+ | - in a web browser, open the temporary URL displayed by the ipython server and start using the ipython notebooks | ||
+ | - when you are finished, <wrap em>do not forget to kill the ipython server</ | ||
+ | * Warning! Closing the browser, or using the Logout button in the browser will not stop the ipython server | ||
+ | |||
+ | ===== Working correctly with the notebooks ===== | ||
+ | |||
+ | ==== Reminder ==== | ||
+ | |||
+ | * Make sure you read and understand the [[# | ||
+ | * If you are doing everything on your own desktop/ | ||
+ | * On a remote and shared server, only start the notebook server and use a local browser to connect to the notebook server through an ssh tunnel | ||
+ | |||
+ | ==== Prerequisite ==== | ||
+ | |||
+ | * | ||
+ | |||
+ | ==== Digging ssh tunnels ==== | ||
+ | |||
+ | The ssh tunnels will allow you to connect a web browser running locally on your computer to a notebook server running on a remote server | ||
+ | |||
+ | === From a local LSCE computer to obelix === | ||
+ | |||
+ | < | ||
+ | |||
+ | |||
+ | plink -L 7225: | ||
+ | |||
+ | ssh -X -t -L7100: | ||
+ | |||
+ | plink -X -t -L7100: | ||
+ | |||
+ | plink -ssh -X -t -L 7100: | ||
+ | |||
+ | plink -X -t -L 7100: | ||
+ | |||
+ | ssh -X -t -L 7100: | ||
+ | |||
+ | (cdatm_py3) jypeter@obelix3 - ...jypeter - 44 >jupyter notebook --no-browser --port=7100 | ||
+ | [I 23: | ||
+ | [I 23: | ||
+ | [I 23: | ||
+ | [I 23: | ||
+ | [I 23: | ||
+ | [I 23: | ||
+ | [C 23: | ||
+ | |||
+ | To access the notebook, open this file in a browser: | ||
+ | file:/// | ||
+ | Or copy and paste one of these URLs: | ||
+ | http:// | ||
/* standard page footer */ | /* standard page footer */ |
other/uvcdat/cdat_conda/ipnb.txt · Last modified: 2019/05/20 11:10 by jypeter