wiki:cypress/JupyterNode

Version 8 (modified by cbaribault, 12 months ago) ( diff )

Updated for use with required token

Jupyter Notebook

The ​Jupyter Notebook is a web application that allows you to create and share documents that contain live code, equations, visualizations, and explanatory text.

  1. Login to Cypress with port-forwarding
    [user@local ~]$ ssh -L 8888:127.0.0.1:12345 userID@cypress.tulane.edu
    
    Replace '12345' with a big number you like.
  1. On Cypress, move to your desired directory (see the cd command) for containing either existing or future notebook files - usually with file extension .ipynb.
  2. Start an interactive session with port-forwarding. Replace '12345' with the same big number you specified above. If you need Centos 7 with glibc 2.17, then include in your idev command the idev parameter —partition=centos7. (See Centos 7/glibc 2.17 and idev options.)
    [userID@cypress2 Python]$ idev --port=12345:8888 -t 8 -c 1
    Requesting 1 node(s)  task(s) to normal queue of defq partition
    1 task(s)/node, 1 cpu(s)/task, 2 MIC device(s)/node
    Time: 08 (hr) 00 (min).
    Submitted batch job 282455
    JOBID=282455 begin on cypress01-093
    --> Creating interactive terminal session (login) on node cypress01-093.
    --> You have 08 (hr) 00 (min).
    --> Assigned Host List : /tmp/idev_nodes_file_fuji
    Last login: Wed Aug 24 11:46:09 2016 from cypress2.cm.cluster
    
    
  1. Load the module and start jupyter notebook server.
    [userID@cypress01-093 Python]$ module load anaconda3
    [userID@cypress01-093 Python]$ jupyter notebook --port=8888 --no-browser
    
  1. Examine the resulting output in your terminal window and locate any occurrence of a string starting with http:// and including a parameter named token assigned to a string of hexadecimal digits (0-9,a-f). The former string is a URL for your own personal use to authenticate the current notebook session.
    http://localhost:8888/?token=9a84272b92849f6d560e0068de58a4b2a4ab0cb00387bf36 (example only)
    
    http://127.0.0.1:8888/?token=9a84272b92849f6d560e0068de58a4b2a4ab0cb00387bf36 (example only)
    
  1. Using your own personal URL from above from your terminal window (not the example above), copy and paste that URL to the address field in your local web browser, and press <Enter> and observe the notebook web page in your browser.

Note: your jupyter notebook session will be killed when the idev-session time exceeds the walltime limit (that is 8 hours in the example above).

Ctrl+c to shutdown jupyter notebook.

Note: See TracWiki for help on using the wiki.