linux配置jupyterlab

2022-06-19 09:59:20

首先
pip3 install jupyterlab
然后生成默认配置文件
jupyter lab --generate-config
会显示
/root/.jupyter/jupyter_lab_config.py
然后
vim /root/.jupyter/jupyter_lab_config.py
修改如下内容

c.ServerApp.allow_remote_access = True #启用远程访问
c.ServerApp.ip = ‘*’ #允许所有IP访问
c.ServerApp.port = 8888 #设置访问端口为8888
c.ServerApp.open_browser = False #停用自动打开浏览器
c.ExtensionApp.open_browser = False
获取密码
执行#ipython
In [1]: from notebook.auth import passwd
In [2]: passwd()
两次确认密码之后,会得到加密密码

argon2:$argon2id$v=19$m=10240,t=10,p=8$USdZ86GONu0pkybWDFVoFA$5h5lUXXU9x3kzxbTg7YjMw

然后再次修改
c.NotebookApp.password =u'argon2:$argon2id$v=19$m=10240,t=10,p=8$USdZ86GONu0pkybWDFVoFA$5h5lUXXU9x3kzxbTg7YjMw'
启动用nohup
nohup jupyter notebook --allow-root > jupyter.log 2>&1 &
在这里插入图片描述

  • 作者:AI界扛把子
  • 原文链接:https://blog.csdn.net/qq_16792139/article/details/121357524
    更新时间:2022-06-19 09:59:20