Technical aspects

Jupyter kernels

JupyterHub with Google Oauth

Here is a list of available kernels on our Jupyter:

JupyterHub with Google Oauth for small groups (external users)

JupyterHub with Google Oauth

We must to add the following to our jupyterhub_config.py file:

from oauthenticator.google import GoogleOAuthenticator
c.JupyterHub.authenticator_class = GoogleOAuthenticator

When JupyterHub runs, these values will be retrieved from the environment variables:

$OAUTH_CALLBACK_URL
$OAUTH_CLIENT_ID
$OAUTH_CLIENT_SECRET

You can also set these values in your configuration file, jupyterhub_config.py

c.GoogleOAuthenticator.oauth_callback_url = 'http[s]://[your-host]/hub/oauth_callback'
c.GoogleOAuthenticator.client_id = 'your-client-id'
c.GoogleOAuthenticator.client_secret = 'your-client-secret'

Configuration on the google API:


https://console.developers.google.com/apis/dashboard?project=jupyter4edu&duration=PT1H


generate id_Client and client secret and set callback url

…………………………...

https://xxxx.smcebi.us.edu.pl/hub/oauth_callback


To make Jupyter create local accounts, set the option:

c.LocalGoogleOAuthenticator.create_system_users = True



Problem with options: c.LocalGoogleOAuthenticator.create_system_users = True


Not create local user after the login with oauth

You must change line in file /etc/adduser.conf


NAME_REGEX='^[a-z][-.@a-z0-9]*$'

And

DIR_MODE=0700


JupyterHub with Google Oauth

We must to add the following to our jupyterhub_config.py file:

from oauthenticator.google import GoogleOAuthenticator
c.JupyterHub.authenticator_class = GoogleOAuthenticator

When JupyterHub runs, these values will be retrieved from the environment variables:

$OAUTH_CALLBACK_URL
$OAUTH_CLIENT_ID
$OAUTH_CLIENT_SECRET

You can also set these values in your configuration file, jupyterhub_config.py

c.GoogleOAuthenticator.oauth_callback_url = 'http[s]://[your-host]/hub/oauth_callback'
c.GoogleOAuthenticator.client_id = 'your-client-id'
c.GoogleOAuthenticator.client_secret = 'your-client-secret'

Configuration on the google API:

https://console.developers.google.com/apis/dashboard?project=jupyter4edu&duration=PT1H

We must to generate id_Client and client secret and set callback url

…………………………...

https://xxxx.smcebi.us.edu.pl/hub/oauth_callback


To make Jupyter create local accounts, set the option:

c.LocalGoogleOAuthenticator.create_system_users = True



Problem with options: c.LocalGoogleOAuthenticator.create_system_users = True


Not create local user after the login with oauth

You must change line in file /etc/adduser.conf


NAME_REGEX='^[a-z][-.@a-z0-9]*$'

And

DIR_MODE=0700


JupyterHub with slurm for big groups ours students

Slurm is a popular resource manager used in many high-performance computing centers. Jupyter notebooks are a favorite tool of machine learning and data science specialists. While they are often run on an individual user's laptop, there are situations that call for specialized hardware, such as GPUs or more memory or CPU cores than are available locally. In those situations, Slurm can allocate a compute instance has the requisite hardware or memory/CPU resources to run the user's notebook for a bounded time period.

Infrastructure for Jupyter4edu