Jupyterhub

From CAC Wiki
Jump to: navigation, search

Using JupyterHub and JupyterLab

JupyterLab is the next-generation of Jupyter notebooks. It is setup in a multi-user fashion using the JupyterHub web application. Logging in

To log in, just go to JupyterHub link. You will need to enter your username and password to log in.

To log out, select Hub, then Log Out from the JupyterHub interface.

The JupyterHub interface

JupyterHub provides two ways of working: using Jupyter Notebooks (you create a notebook and execute code as a set of “cells”, with results and documentation appearing inline), or as a more traditional text editor and IPython console.

To start a new notebook, select the Python 3 option from the menu. To execute a cell, enter the code you want to run and press Shift-Enter.

To start a new script, create a new file in the text editor and save it with an extension of “.py”. Right-clicking on the text editor will let you create a new Python 3 console for your session. You can execute code line-by-line using Shift-Enter.

More information about the JupyterHub interface can be found here. Adding new Jupyter kernels

JupyterHub is a web interface that sends commands to Python process running in the background. This Python process, called a kernel, is what is actually executing your code. We’ve setup JupyterHub with a few common kernels for common Python configurations and R. If you want to add a kernel (from say a custom Python environment or other programming language), follow the instructions for your kernel from here.

Note: conda is not recommended as it may lead to conflicts with the cvmfs software stack that is part of both CAC and the Digital Alliance of Canada. We strongly recommend using virtualenv instead.

(Under Construction)