-
Notifications
You must be signed in to change notification settings - Fork 8
Install and launch Jupyter Hub
Don Jayamanne edited this page Sep 26, 2023
·
1 revision
Instructions can be found here:
- https://jupyterhub.readthedocs.io/en/stable/tutorial/quickstart.html#quickstart
- https://jupyterhub.readthedocs.io/en/stable/reference/authenticators.html
- Create a new folder
- Create a file named
jupyterhub_config.py
and paste the below contents into that file- Custom config to make auth easier, else you need use your login creds, which I guess you don't want to use.
# Configuration file for jupyterhub.
c = get_config() #noqa
c.JupyterHub.authenticator_class = 'jupyterhub.auth.DummyAuthenticator'
c.DummyAuthenticator.password = "pwd" # Feel free to change the default password
c.Spawner.args = ['--NotebookApp.allow_origin=*']
from jupyterhub.spawner import SimpleLocalProcessSpawner
c.JupyterHub.spawner_class = SimpleLocalProcessSpawner
- Create a virtual env in this folder using Python extension
- Install Jupyterhub using the CLI
python -m pip install jupyterlab jupyterhub
- Install the npm package
configurable-http-proxy
globally via the clinpm i -g configurable-http-proxy
- Now start Jupyter Hub using the cli
jupyterhub
(ensuring the cwd in the terminal is the same folder in step 1 and your virtual env is in the same folder under.venv
) - In the browser navigate to Jupyter Hub login page, genrally
http://localhost:8000
- There is no need to log into JupyterHub
- Go into VS Code, open a notebook
- From the kernel picker select
Existing JupyterHub Server...
- Enter the Jupyter Hub Url
http://localhost:8000
- Follow the prompts to enter the username/password