start:development:ides_and_editors:notebooks

Notebooks

Warning

Please note that we do not support the use of Jupyter Notebooks on MOGON!

Try out the following if you want to run a Jupyter Notebook on the MOGON clusters, but want to run the browser locally.

Setup using Installed Modules

  1. Open a new terminal on your local computer and perform a regular login to MOGON
    ssh mogon
  2. Now load the proper module and create an interactive job
    module load tools/IPython
    srun -A <account> -p <partition> -t <time>  --pty bash -i
  3. Once the resources are granted, launch the Jupyter notebook on the compute node, e.g. with --port 8888:
    jupyter notebook --no-browser --port <portB>

    You should get an similar output to the following:

    To access the notebook, open this file in a browser:
            file:///gpfs/fs1/home/<username>/.local/share/jupyter/runtime/nbserver-00001-open.html
        Or copy and paste one of these URLs:
            http://<ComputeNode.mogon>:<portB>/?token=<unique token>
         or http://127.0.0.1:<portB>/?token=<unique token>
     
  4. You will need to subsequently log in using a different terminal on your local computer:
    ssh -t mogon -L <portA>:<ComputeNode.mogon>:<portB>
    1. where <portA> needs to be unique. A reasonable suggestion is to choose the first four digits from your user id, e.g.:
      • id -u $USER or id -u $USER | cut -c1-4
      • ssh -t mogon -L $(id -u $USER | cut -c1-4):<ComputeNode.mogon>:<portB>
  5. You can then enter localhost:<portA> into your browser's address bar. Jupyter will then ask you to provide the token, which you can copy & paste from the first terminal output. This is given here as <unique token>.

Caution

  • port 8888 might already be in use.
  • You alias to MOGON might be different from the one given here (ssh mogon), please refer to this Article to learn more.
  • start/development/ides_and_editors/notebooks.txt
  • Last modified: 2022/03/10 09:26
  • by jrutte02