目录
前言
详见:JupyterHub — JupyterHub 2.3.0.dev documentation
个人用户一般不需要安装JupyterHub,安装Jupyter notebook 或者JupyterLab即可,推荐Jupyter Lab。
Jupyter notebook:
JupyterLab:
JupyterHub 是一个多用户的jupyter notebook。在服务器上安装jupyter Hub可以同时为多用户提供jupyter notebook服务。
-
If you need a simple case for a small amount of users (0-100) and single server take a look at The Littlest JupyterHub distribution.
-
If you need to allow for even more users, a dynamic amount of servers can be used on a cloud, take a look at the Zero to JupyterHub with Kubernetes .
Four subsystems make up JupyterHub:
-
a Hub (tornado process) that is the heart of JupyterHub
-
a configurable http proxy (node-http-proxy) that receives the requests from the client’s browser
-
multiple single-user Jupyter notebook servers (Python/IPython/tornado) that are monitored by Spawners
-
an authentication class that manages how users can access the system
Besides these central pieces, you can add optional configurations through a config.py
file and manage users kernels on an admin panel. A simplification of the whole system can be seen in the figure below:
JupyterHub performs the following functions:
-
The Hub launches a proxy
-
The proxy forwards all requests to the Hub by default
-
The Hub handles user login and spawns single-user servers on demand
-
The Hub configures the proxy to forward URL prefixes to the single-user notebook servers
For convenient administration of the Hub, its users, and services, JupyterHub also provides a REST API.
The JupyterHub team and Project Jupyter value our community, and JupyterHub follows the Jupyter Community Guides.
安装jupyterhub
安装需求
- linux操作系统;
- python3.4或者以上的版本,且需要安装pip或者conda;
- 需要安装nodejs/npm;
- jupyter notebook4或者以上版本。
安装JupyterHub
python3 -m pip install jupyterhub
npm install -g configurable-http-proxy
python3 -m pip install notebook
按需安装:yum install -y nodejs nodejs-npm
配置
- 创建/etc/jupyterhub目录
- 创建jupyterhub配置文件
jupyterhub –generate-config
在/etc/jupyterhub目录下生成一个jupyterhub_config.py文件,包含jupyterhub的默认配置 项,根据需要修改。
其他配置
- jupyterhub配置nbextensions
pip install jupyter_contrib_nbextensions
jupyter contrib nbextension install –system
启动Jupyterhub
jupyterhub -f /etc/jupyterhub/jupyterhub_config.py
待完善......