Child pages
  • Mox_ipython_jupyter
Skip to end of metadata
Go to start of metadata

This page assumes that you have experience with using IPython/Jupyter on laptop or desktop computer. (Jupyter is the new name for IPython.) There are three main ways to work with IPython on hyak. These three ways are also the same as on a desktop computer.

Install your own copy of anaconda.

See section on "Install Anaconda Python" at below link

Hyak python programming

Issue below command to verify that you are using your own copy of Anaconda Python:

which python

IPython/Jupyter terminal or IPython/Jupyter qtconsole

(for linux and mac client machines or windows with cygwin or similar software)

Use X11 forwarding (Replace abc by your hyak userid) :

ssh -X abc@mox.hyak.uw.edu

Get an interactive node: (xyz is the group name and abc is the userid). 

[abc@mox1 ~]$ srun -p xyz --time=2:00:00 --mem=100G --pty /bin/bash
[abc@n1234 ~]$ jupyter qtconsole

IPython notebook

  • On a mox login node: *

Get an interactive node: (xyz is the group name and abc is the userid).

[abc@mox1 ~]$ srun -p xyz --time=2:00:00 --mem=100G --pty /bin/bash

(Suppose the node hostname is n1234 and so the node number is 1234.)

jupyter notebook --no-browser --port=8899

  • On your desktop: *

Replace abc by your hyak userid:

ssh -N -f -L 127.0.0.1:8899:127.0.0.1:8899 abc@mox.hyak.uw.edu

  • On another hyak login node : *

Replace 1234 by the interactive node number:

ssh -N -f -L 127.0.0.1:8899:127.0.0.1:8899 n1234

  • On your desktop: *
 Point your browser to:

http://127.0.0.1:8899

You should see a Jupyter notebook. You will have to give the token number to login. The token number is the long string of characters and numbers which shows up in the terminal window where you started jupyter.

 

After you are done with your Jupyter work, exist all three terminal windows. (two mox terminals and one terminal on your local machine.) Issue below command:

ps aux | grep ssh

If there are any processes like "ssh -N..." then note their PID and end them.

 

Ignore below:

export XDG_RUNTIME_DIR=""

Alternative to the command export XDG_RUNTIME_DIR=""  is to ssh to mox login node from another terminal window. From this other terminal window, ssh to the same interactive node which you got above. This will create a directory /run/user/pqr on the interactive node. Here pqr is  your uid number. After this, you can do above steps and run jupyter.

 

  • No labels