User Tools

Site Tools


jupyter

This is an old revision of the document!


OK so there's not a lot of steps to go through here. Setting up the SSH tunnel itself is a one-command operation. My primary use-case is to launch jupyter-notebook, which adds a few more steps.

  1. Item Choose a port that is not being used on Astronomy. Lets call it 1234.
  2. Open a command line terminal and type: “ssh my_login@astronomy.nmsu.edu -NL 1234:localhost:1234”
  3. Enter your password at the prompt. The terminal may appear to hang; this is fine.

Congratulations! You now have completed an ssh tunnel to the astronomy server. You can use it to, for example, launch, edit, and run a jupyter notebook using your local browser.

To do this:

  1. Open a second command line terminal. Type 'ssh my_login@astronomy.nmsu.edu' and enter your password at the prompt.
  2. Activate the correct python environment via the command 'conda activate py3.11'
  3. Launch jupyter-notebook with the command 'jupyter-notebook –no-browser –port 1234' (NOTE the dashes in front of “no-browser” and “port” are double dashes “- -”
  4. A short feed of messages will scroll by. Find the one that says “To access this notebook…”, followed by a pathname, followed by “Or copy and paste one of these URLs:”
  5. Copy the URL that starts with “http://localhost:1234”. CAREFUL: Using ctrl-c to copy selected text will kill the notebook!
  6. Paste the URL into your browser of choice. If all goes well, you'll be greeted by a the standard jupyter-notebook file browser screen!

That's it! Now you can run Jupyter notebooks remotely to your heart's content.

jupyter.1752087011.txt.gz · Last modified: by astroadmin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki