官网:https://tljh.jupyter.org/en/latest/
官方安装文档:https://tljh.jupyter.org/en/latest/install/custom-server.html
我们选择使用
The Littlest JupyterHub, a recent and evolving distribution designed for smaller deployments, is a lightweight method to install JupyterHub on a single virtual machine. The Littlest JupyterHub (also known as TLJH), provides a guide with information on creating a VM on several cloud providers, as well as installing and customizing JupyterHub so that users may access it at a public URL.
其适用范围是:
A simple JupyterHub distribution for a small (0-100) number of users on a single server. We recommend reading When to use The Littlest JupyterHub to determine if this is the right tool for you.
原理:
由于需要从GitHub下载代码,因此一键安装脚本必须使用代理:
1 2 3 |
export http_proxy=http://192.168.0.30:21089 export https_proxy=http://192.168.0.30:21089 curl --socks5-hostname 192.168.0.30:21088 -L https://tljh.jupyter.org/bootstrap.py | sudo -E python3 - --admin root |
安装完成后,JupyterHub内部创建的用户会在/home下被创建出对应的用户、用户组及目录,并以此实现权限隔离:
可以看到JupyterHub会自动创建一个单独的env:
JupyterHub利用操作系统用户、操作系统组、操作系统目录做权限隔离,notebook通过Spawner来拉起,Spawner有几种,我们现在用的默认的本地进程,还可以支持Docker以及K8S等:
参考文档:
1、https://tljh.jupyter.org/en/latest/
转载时请保留出处,违法转载追究到底:进城务工人员小梅 » JupyterHub安装