使用公有云快速搭建jupyter实验环境

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

安装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'}
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值