Installing on Jetstream#
By the end of this tutorial, you should have a JupyterHub with some admin users and a user environment with packages you want installed running on Jetstream.
A Jetstream account with an XSEDE allocation; for more information, see the Jetstream Allocations help page.
Step 1: Installing The Littlest JupyterHub#
Let’s create the server on which we can run JupyterHub.
Log in to the Jetstream portal. You need an allocation to launch instances.
Select the Launch New Instance option to get going.
This takes you to a page with a list of base images you can choose for your server.
Under Image Search, search for Ubuntu 22.04, and select the Ubuntu 22.04 Devel and Docker image.
Once selected, you will see more information about this image. Click the Launch button on the top right.
A dialog titled Launch an Instance / Basic Options pops up, with various options for configuring your instance.
Give your server a descriptive Instance Name.
Select an appropriate Instance Size. We suggest m1.medium or larger. Make sure your instance has at least 1GB of RAM.
Check out our guide on How To Estimate Memory / CPU / Disk needed to help pick how much Memory, CPU & disk space your server needs.
If you have multiple allocations, make sure you are ‘charging’ this server to the correct allocation.
Click the Advanced Options link in the bottom left of the popup. This lets us configure what the server should do when it starts up. We will use this to install The Littlest JupyterHub.
A dialog titled Launch an Instance / Advanced Options should pop up.
Click the Create New Script button. This will open up another dialog box!
Under Input Type, select Raw Text. This should make a text box titled Raw Text visible on the right side of the dialog box. Copy the text below, and paste it into the Raw Text text box. Replace
<admin-user-name>with the name of the first admin user for this JupyterHub. This admin user can log in after the JupyterHub is set up, and can configure it to their needs. Remember to add your username!
#!/bin/bash curl -L https://tljh.jupyter.org/bootstrap.py \ | sudo python3 - \ --admin <admin-user-name>
Under Execution Strategy Type, select Run script on first boot.
Under Deployment Type, select Wait for script to complete.
Click the Save and Add Script button on the bottom right. This should hide the dialog box.
Click the Continue to Launch button on the bottom right. This should put you back in the Launch an Instance / Basic Options dialog box again.
Click the Launch Instance button on the bottom right. This should turn it into a spinner, and your server is getting created!
You’ll now be shown a dashboard with all your servers and their states. The server you just launched will progress through various stages of set up, and you can see the progress here.
It will take about ten minutes for your server to come up. The status will say Active and the progress bar will be a solid green. At this point, your JupyterHub is ready for use!
Copy the IP Address of your server, and try accessing it from a web browser. It should give you a JupyterHub login page.
Login using the admin user name you used in step 8, and a password. Use a strong password & note it down somewhere, since this will be the password for the admin user account from now on.
Congratulations, you have a running working JupyterHub!
Step 2: Adding more users#
Most administration & configuration of the JupyterHub can be done from the web UI directly. Let’s add a few users who can log in!
In the File menu select the entry for the Hub Control Panel.
In the control panel, open the Admin link in the top left.
This opens up the JupyterHub admin page, where you can add / delete users, start / stop peoples’ servers and see who is online.
Click the Add Users button.
A Add Users dialog box opens up.
Type the names of users you want to add to this JupyterHub in the dialog box, one per line.
You can tick the Admin checkbox if you want to give admin rights to all these users too.
Click the Add Users button in the dialog box. Your users are now added to the JupyterHub! When they log in for the first time, they can set their password - and use it to log in again in the future.
Congratulations, you now have a multi user JupyterHub that you can add arbitrary users to!
Step 3: Install conda / pip packages for all users#
The User Environment is a conda environment that is shared by all users
in the JupyterHub. Libraries installed in this environment are immediately
available to all users. Admin users can install packages in this environment
Log in as an admin user and open a Terminal in your Jupyter Notebook.
sudo -E conda install -c conda-forge gdal
sudo -Eis very important!
Install there with
sudo -E pip install there
there are now available to all users in JupyterHub.
If a user already had a python notebook running, they have to restart their notebook’s
kernel to make the new libraries available.
See Install conda, pip or apt packages for more information.