Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
| deeplearning:dellvolta100:jupyter [2020/03/11 09:52] – admin | deeplearning:dellvolta100:jupyter [2020/03/11 10:31] (Version actuelle) – [Submit SGE Job] admin | ||
|---|---|---|---|
| Ligne 8: | Ligne 8: | ||
| ====== Submit SGE Job ====== | ====== Submit SGE Job ====== | ||
| - | Request one GPU and 40Gb of memory for example: | + | Request one GPU and 40Gb of memory for 4 hours : |
| <code bash> | <code bash> | ||
| - | $ qlogin -q volta.q -l h_vmem=40G | + | $ qlogin -q volta.q -l h_vmem=40G |
| </ | </ | ||
| + | |||
| + | ====== Start Jupyter Notebook ====== | ||
| + | In the opened shell session, we need to start '' | ||
| + | to isolate a new environment, | ||
| + | |||
| + | But first, as usual we need to modify HOME directory to WORK (because HOME is Read Only) | ||
| + | |||
| + | <code bash> | ||
| + | $ export HOME=$WORK | ||
| + | </ | ||
| + | |||
| + | We load '' | ||
| + | <code bash> | ||
| + | $ module load anaconda | ||
| + | </ | ||
| + | |||
| + | We create or connect to our isolated '' | ||
| + | Suppose that we have already an environment (use '' | ||
| + | <code bash> | ||
| + | $ conda activate / | ||
| + | </ | ||
| + | |||
| + | Finally we start '' | ||
| + | <code bash> | ||
| + | $ (/ | ||
| + | </ | ||
| + | commands options are : | ||
| + | * '' | ||
| + | * '' | ||
| + | * The system will pick a random port number to use. | ||
| + | |||
| + | |||
| + | ====== Connect to the notebook | ||
| + | |||
| + | If all goes well we see this message with important information | ||
| + | |||
| + | <code bash> | ||
| + | [I 11: | ||
| + | [I 11: | ||
| + | [I 11: | ||
| + | [I 11: | ||
| + | [I 11: | ||
| + | [I 11: | ||
| + | [C 11: | ||
| + | | ||
| + | To access the notebook, open this file in a browser: | ||
| + | file:/// | ||
| + | Or copy and paste one of these URLs: | ||
| + | http:// | ||
| + | |||
| + | </ | ||
| + | |||
| + | There are three important pieces of information, | ||
| + | * The node used by SGE, here **node2-69** | ||
| + | * The port picked by Jupyter-nootbook, | ||
| + | * The token of the session, here '' | ||
| + | |||
| + | <note important> | ||
| + | We have to use ssh port tunneling. </ | ||
| + | |||
| + | ===== SSH tunnel ===== | ||
| + | We need to establish a tunnel from '' | ||
| + | Here is the command to use from '' | ||
| + | <code bash> | ||
| + | $ ssh -g -N -L 9999: | ||
| + | </ | ||
| + | |||
| + | This command will map remote port '' | ||
| + | Finally we will modify the URL above to connect to our Jupyter session. | ||
| + | |||
| + | OLD URL proposed by Jupyter: | ||
| + | * http:// | ||
| + | |||
| + | The new URL to use, from your browser: | ||
| + | * http:// | ||
| + | |||
| + | |||