JupyterHub
Jump to navigation
Jump to search
Setup JupyterHub
- create new user and group jupyterhub and put user in group shadow
- allow sudo for members of group. Create /etc/sudoers.d/jupyterhub
Cmnd_Alias JUPYTER_CMD = /home/jupyterhub/miniconda3/bin/sudospawner jupyterhub ALL=(%jupyterhub) NOPASSWD:JUPYTER_CMD
- install conda for that user
script=Miniconda3-latest-Linux-x86_64.sh wget "https://repo.anaconda.com/miniconda/$script" chmod +x "$script" "./$script" -b ~/miniconda3/bin/conda init bash . ~/.bashrc conda update conda
- install packages
conda install -c conda-forge jupyterhub sudospawner opencv pandas matplotlib
- configure jupyterhub
jupyterhub --generate-config -f jupyterhub_config.py add line "c.JupyterHub.bind_url = 'http://:7000'" to config file
- start the hub
jupyterhub --JupyterHub.spawner_class=sudospawner.SudoSpawner
- login at http://localhost:7000