安装npm和nodejs
apt install npm nodejs
npm install -g n
n stable
pip install jupyterhub
sudo npm install -g configurable-http-proxy
pip install notebook
pip install jupyterhub-dummyauthenticator
测试是否安装成功
jupyterhub -h
configurable-http-proxy -h
安装jupyterlab
pip install jupyterlab
配置Jupyterhub
生成配置文件
mkdir -p /etc/jupyterhub
cd /etc/jupyterhub
jupyterhub --generate-config
nano jupyterhub_config.py
nano打开之后,在文件开头加入如下内容
###jupyterhub_config.py
# 新增配置属性,建议直接加在文件开头就好
## 启用JupyterLab
c.Spawner.default_url = '/lab'
## 所有IP都可以访问
c.JupyterHub.ip = '*'
c.JupyterHub.port = 8888
c.Spawner.ip = '127.0.0.1'
c.PAMAuthenticator.encoding = 'utf8'
## 指定可以访问的Ubuntu用户
c.Authenticator.whitelist = {'root','user1','user2'}

该文详细介绍了如何在Ubuntu系统中安装npm、nodejs,接着安装并配置Jupyterhub,包括设置可访问用户、启用JupyterLab以及端口转发,最后启动Jupyter服务,使得用户可以通过本地机器访问运行在远程服务器的Jupyterhub环境。
最低0.47元/天 解锁文章
1654

被折叠的 条评论
为什么被折叠?



