Jupyterhub
Overview
Teaching: 0 min
Exercises: 0 minQuestions
How to get access to Jupyterhub?
How to start/stop Jupyter notebooks in the Jupyterhub?
Objectives
Learn about Jupyterhub
Introduction of Jupyterhub
The CMIP6 data analysis will be conducted directly at jupyterhub. We will be using https://geo4962.tacco.sigma2.no/. The main advantage of this is that all the data we need are directly accessible through the web interface and the necessary post-processing and visualization packages we need are already available.
Setup instructions for accessing Jupyterhub
- You should have received an info email containing an invitation link. If not please request it to the course organizers.
- Follow the invitation link in the email message
- If you don’t already have a Feide guest user account click “Feide guest users”. (If you already have a Feide guest user account, skip this step)
- register a new account (do not use your UiO username as it may be confusing for everyone).
- finish the registration process
- click again on the “invitation link” in the email
- Login with “Feide guest users”
- Accept the different policies
- Agree to become a member of the NS1004K: the browser should display the message “Loading group details”
- Now go to GEO4962 Jupyterhub
- Click “Sign in with Dataporten”
- Login with Feide Guest User (Not your UiO username)
- Finally the web browser should display a page with “jupyterlab” on the upper left side
For later usage of the notebooks just use the GEO4962 Jupyterhub link
Login to the JupyterHub
- Click on Dataporten
-
Do not use your Feide user account, so click on **Can’t find your user account?
-
In Other login alternatives, click on Feide guest users
- Use the username and password you have received and sign In.
Tips
Before getting to the username/password login page, your browser may warn you about the security of the website and get a message such as “This site is not secure”. In order to bypass this security message, you need to accept to proceed. Let us know if you still have problems to login.
Start and stop your server
When you manage to successfully login to the Jupyterhub, you should have the following panels:
To start/stop your server, click on Hub Control Panel:
When your server is not running, the button “Stop My Server” does not appear and you only see the button “My Server”.
- To stop your server, click on “Stop My Server”
- To start your server, click on “My Server”
Important note
Make sure you stop your server once you have finished your session. We need to do this to release resources for next time.
The JupyterLab Interface
By default, you will get the web-based user interface for Project Jupyter that is called JupyterLab.
Menu Bar
The menu bar at the top of JupyterLab has top-level menus that expose actions available in JupyterLab with their keyboard shortcuts. The default menus are:
- File: actions related to files and directories
- Edit: actions related to editing documents and other activities
- View: actions that alter the appearance of JupyterLab
- Run: actions for running code in different activities such as notebooks and code consoles
- Kernel: actions for managing kernels, which are separate processes for running code
- Tabs: a list of the open documents and activities in the dock panel
- Settings: common settings and an advanced settings editor
- Help: a list of JupyterLab and kernel help links
Left Sidebar
The left sidebar contains a number of commonly-used tabs, such as a file browser, a list of running kernels and terminals, the command palette, and a list of tabs in the main work area:
If you move your mouse on the other icon of this left sidebar, a short information is given on its functionality.
If you click on the “stop button” icon, you can see what is currently running on your server and you can click on “SHUT DOWN” to stop a running Python notebook or Terminal.
Start a new Terminal
Similarly, you can start a new Terminal by clicking on “Terminal” in the Launcher.
Tips
If the Launcher tab does not exist anymore in your JupyterLab, you can start a new one in “File –> New Launcher”.
Create a new python 3 notebook
Go back to the File Browser left sidebar tab and in the launcher select Python 3 under the Notebook section:
By default, your new notebook is named as “Untitled.ipynb”:
- ipynb is the extension for any Jupyter notebook and you should make sure all your notebooks get this extension (otherwise it is not recognized as a Jupyter notebook)
- you can rename your jupyter notebook with the tab “File –> Rename Notebook…” or right click on its name.
Getting help in a jupyter notebook
Python (general and available outside jupyter notebook)
In addition to online help, you can use help
function:
import matplotlib
help(matplotlib)
The Jupyter Notebook has two ways to get help:
- Place the cursor inside the parentheses of the function, hold down shift, and press tab.
- Or type a function name with a question mark after it.
Key Points
Jupyterhub