JupyterServer配置

1. 安装jupyter

​pip install jupyter -i https://pypi.tuna.tsinghua.edu.cn/simple --default-timeout=1000

2. 生成配置

jupyter notebook --generate-config 

3. 修改配置,设置密码

获取密码的方式:命令行输入python后,用以下方式获取

from jupyter_server.auth import passwd
passwd('xxxx')

配置文件如下

# 打开文件编辑
vi /root/.jupyter/jupyter_notebook_config.py


# 编辑以下内容
c.NotebookApp.open_brower = False # 不需要在服务器上打开浏览器
c.NotebookApp.ip = '*' # 监听网络
c.ServerApp.notebook_dir = '/root'   # 指定目录
c.PasswordIdentityProvider.hashed_password = 'argon2:$argon2id$v=19$m=10240,t=10,p=xxxx' # 密码使用上面的方式获取
c.ServerApp.port = 8888  # 端口自己可以指定

4. 后台启动jupyter记入log 

nohup jupyter notebook >> jupyter-server.log 2>&1 &

 5. 远程访问

到此就配置好了。如果你的IP是192.168.1.1的话,你就可以在浏览器地址栏上输入192.168.1.1:8888进入Jupyter notebook了。

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值