Research Computing | Using Jupyter Notebook

Video
Transcript or Alternate URL: 

Hello, and welcome. In this video, we will examine how to: Run Jupyter Notebook on Iowa State Research IT servers. In this tutorial I'll be connecting to speedy from a Mac. I am going to use two Terminal windows. In one, I will connect to speedy using ssh. Once Connected, load the Jupyter module. module load py-jupyter-notebook Since we are in a terminal session, we do not want Jupyter to try to open a web browser on the server. We'll do that ourselves in a moment. Therefore, we pass the --no-browser option Jupyter is also going to want to listen to a port. I've chosen 9999 for this port. You can also leave this off and let Jupyter choose a port for you. So the command to start jupyter notebook is: jupyter-notebook --no-browser --port 9999 Jupyter is now running, waiting for connections. But the research IT machines don't just accept connections from anyone. To get around that, I will use a second terminal window on my computer to create an ssh tunnel from my computer to the server. What this means is, I will connect to port 9999 on my own machine and it will tunnel through my ssh connection and actually connect to port 9999 on speedy. 9999 is an arbitrary number, you can choose to a different number if this port is being used on your network. Now I'll open a web browser on my computer and go to http://localhost:9999/ and presto, I have connected to jupyter notebook, and I'm looking at my home directory on speedy. Note that your link will be different as jupyter generates a different random token each time. Now we will run a quick python script on Jupyter Notebook as an example. You can now run Jupyter Notebook from any of the Research It servers. As always, we recommend that you understand the material presented here before continuing with the next videos.