官網(wǎng) https://jupyterhub.readthedocs.io/en/latest/installation-guide.html
文件結(jié)構(gòu)
/srv/jupyterhub for all security and runtime files
/etc/jupyterhub for all configuration files
/var/log for log files
pip就轧、conda和docker三種安裝方式
JupyterHub can be installed with pip
(and the proxy with npm
) or conda
:
pip, npm:
python3 -m pip install jupyterhub
npm install -g configurable-http-proxy
python3 -m pip install notebook # needed if running the notebook servers locally
conda (one command installs jupyterhub and proxy):
conda install -c conda-forge jupyterhub # installs jupyterhub and proxy
conda install notebook # needed if running the notebook servers locally
Starting JupyterHub with docker
docker
The JupyterHub docker image can be started with the following command:
docker run -d --name jupyterhub jupyterhub/jupyterhub jupyterhub
This command will create a container named jupyterhub
that you can stop and resume with docker stop/start
.
檢測是否安裝成功
jupyterhub -h
configurable-http-proxy -h
啟動服務(wù)
jupyterhub
訪問瀏覽器 https://localhost:8000 即可麻敌,底層還是jupyter notebook香拉,只是增加了一些功能封裝哑蔫。有時候8000接口被占用柄瑰,這個時候啟動會自動選擇一個未占用接口换吧,看命令窗口的信息即可。
配置文件
生成配置文件
jupyterhub --generate-config
一般我們把文件放到 /etc/jupyterhub
創(chuàng)建相關(guān)文件夾甲抖,然后設(shè)置該路徑配置
jupyterhub -f /etc/jupyterhub/jupyterhub_config.py