Editing CommunityData:Hyak Ikt (Deprecreated)

From CommunityData

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 87: Line 87:


If you have a lot of dependencies for a specific project, consider using [[#Python Virtual Environments |Python Virtual Environments]]
If you have a lot of dependencies for a specific project, consider using [[#Python Virtual Environments |Python Virtual Environments]]
== Jupyter Notebook on Hyak ==
1. Choose a number you are going to use as a port. We should each use a different port and the number should be between 1000 and 65000. It doesn't matter what it is but it needs to be unique. Pick something unique. In the following instructions, replace '''$PORT''' with your number below.
2. Connect to Hyak and forward the the port from you local machine to the new one:
ssh -L localhost:'''$PORT''':localhost:'''$PORT''' '''username'''@hyak.washington.edu
You can also add the following line to the Hyak section on your local .ssh/config file on your laptop:
Β  Β  LocalForward '''$PORT''' localhost:'''$PORT'''
3. We're going to need to connect to one of the compute servers ''twice''. As a result, we'll use a program called <code>tmux</code>. Tmux is very similar (but a little easier to learn) than a program called <code>screen</code>. If you know screen, just use that. Otherwise, run tmux like:
tmux
You can tell you're in tmux because of the green line at the bottom of the screen.
4. "Check out" a compute node
any_machine
5.
Keep track of which machine you are on. It should be something like '''n0650''' and it should be displayed on the prompt. We'll refer to it as '''$HOST''' below.
6. Start jupyter on the compute node:
jupyter-notebook --no-browser --port='''$PORT'''
You'll see that jupyter just keeps running in the background. This can be useful because when there are errors, they will sometimes be displayed in this terminal. Generally, you can just ignore this though.
6. Create a new window in tmux/screen
At this point, you have jupyter running on the compute node on $PORT. You also will have forwarded the port from your laptop to the login node. We're really only missing one thing which is the tunnel from the login node to the compute node within hyak. To do this, we'll create a new window inside tmux with the keystroke '''Ctrl-b c'''.
If you're not familiar with it, you'll want to read the [[CommunityData:tmux]] which includes a quick cheatsheet. To switch back to the original window running jupyter, you should type: '''Ctrl-b 0'''. If you switch though, be sure to switch back to the new window with '''Ctrl-b 1'''.
Because you originally ran tmux on the login node, the new window/terminal will be opened within tmux on the login node.
7. Open a tunnel from the login node to the compute node.
Β  ssh -L localhost:'''$PORT''':localhost:'''$PORT''' '''$HOST'''
8. In your local browser, localhost:'''$PORT'''


== Set up a password for Jupyter Notebook on Hyak ==
== Set up a password for Jupyter Notebook on Hyak ==
Please note that all contributions to CommunityData are considered to be released under the Attribution-Share Alike 3.0 Unported (see CommunityData:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)

Template used on this page: