start:software:topical:physics:jupyter

This is an old revision of the document!


Jupyter Notebooks on Mogon / Himster

Try out the following if you want to run Jupyter on our cluster but run the browser locally.

  1. ssh mogon2
  2. [pbotte@login23 ~]$ python3 -m venv testjupyter
  3. [pbotte@login23 ~]$ source testjupyter/bin/activate
  4. [pbotte@login23 ~]$ pip3 install jupyter
  5. Change config:
    1. [pbotte@login23 ~]$ jupyter notebook –generate-config
    2. change in ~/.jupyter/jupyter_notebook_config.py:
      1. c.NotebookApp.allow_remote_access = True
      2. c.NotebookApp.ip = '*'
      3. c.NotebookApp.open_browser = False
      4. double check that these lines are not commented out!
  1. ssh -L 12345:localhost:8888 himster2
  2. [pbotte@login23 ~]$ source testjupyter/bin/activate
  3. (testjupyter) [pbotte@login23 ~]$ jupyter notebook
  4. Open locally: http://localhost:12345
    • Enter the code presented in terminal

Caution:

  • others might already use port 8888.
  • If port already in use, change config file and the port forward in SSH.

setup as shown above in section “Jupyter on head node with plain python”

  1. ssh himster2
  2. [pbotte@login23 ~]$ salloc -p himster2_exp -N 2 –time=01:00:00 -A m2_him_exp #change the account accordingly
  3. [pbotte@login23 ~]$ ssh x0784 #log into the computer node you got assigned
  4. [pbotte@x0784 ~]$ source testjupyter/bin/activate
  5. (testjupyter) [pbotte@x0784 ~]$ jupyter notebook
  6. ssh -L 12346:x0784.mogon:8888 himster2
  7. Open locally: http://localhost:12346
    • Enter the code presented in terminal
  • start/software/topical/physics/jupyter.1633980808.txt.gz
  • Last modified: 2021/10/11 21:33
  • by pbotte