Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tools Jupyter JupyterHub #66

Open
junxnone opened this issue May 11, 2019 · 1 comment
Open

Tools Jupyter JupyterHub #66

junxnone opened this issue May 11, 2019 · 1 comment

Comments

@junxnone
Copy link
Owner

junxnone commented May 11, 2019

Reference

Brief

  • 多用户 jupyter notebook

Install

Install on host

pip3 install jupyterhub
sudo -E npm install -g configurable-http-proxy

Install with Docker

docker run -d -p 8000:8000 --name jupyterhub jupyterhub/jupyterhub jupyterhub

Configure

Host

Create jupyterhub user, Install sudospawner to use PAM

sudo useradd jupyterhub
sudo pip install sudospawner
sudo visudo

To make PAM works, add this lines:

Cmnd_Alias JUPYTER_CMD = /usr/local/bin/sudospawner
%jupyterhub ALL=(jupyterhub) /usr/bin/sudo
jupyterhub ALL=(%jupyterhub) NOPASSWD:JUPYTER_CMD
sudo adduser -G jupyterhub your_username

Generate the config file

jupyterhub --generate-config -f config/jupyterhub_config.py
sudo -u jupyterhub jupyterhub --JupyterHub.spawner_class=sudospawner.SudoSpawner \
-f ./config/jupyterhub_config.py

diff with the origin config file

< #c.JupyterHub.admin_access = False
---
> c.JupyterHub.admin_access = True
48a49
> c.JupyterHub.admin_users = {'name','name','name'}
167c168
< #c.JupyterHub.data_files_path = '/usr/local/share/jupyterhub'
---
> #c.JupyterHub.data_files_path = '/home/name/.local/share/jupyterhub'
318c319
< #c.JupyterHub.ip = ''
---
> c.JupyterHub.ip = 'your_ip'
356c357
< #c.JupyterHub.port = 8000
---
> c.JupyterHub.port = 8000
464c465
< #c.JupyterHub.statsd_prefix = 'jupyterhub'
---
> c.JupyterHub.statsd_prefix = 'jupyterhub'
636a638
> c.Spawner.env_keep.append('LD_LIBRARY_PATH')
820a823
> c.Authenticator.admin_users = {'name','name','name','name'}
933a937
> c.Authenticator.whitelist = {'name','name','name','name','name','name'}

name is your users

@junxnone
Copy link
Owner Author

junxnone/linux#52

@junxnone junxnone transferred this issue from junxnone/examples Sep 8, 2019
@junxnone junxnone transferred this issue from junxnone/Linux_archive Sep 22, 2021
@junxnone junxnone changed the title JupyterHub Build Jupyter JupyterHub Dec 22, 2022
@junxnone junxnone transferred this issue from junxnone/techwiki Dec 22, 2022
@junxnone junxnone changed the title Build Jupyter JupyterHub Tools Jupyter JupyterHub Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant