Jupyter Lab 设置


##1. Jupyter Lab 安装

安装 JupyterLab 非常简单,只需一行命令即可:

conda 安装 [Miniconda]

conda install -c conda-forge jupyterlab

pip 安装

pip install jupyterlab

2. JupyterLab 安全验证

JupyterLab 使用密码保证服务的安全,从而确保其他用户无法登录使用。默认情况下,会自动生成随机密码,如 : http://127.0.0.1:8888/lab?token=2cefb80900a38689d9d0d2c4927832fa4ae322b1e441c601,其中 token=密码。

为方便远程登录,可手动设置密码,方法如下:

  • 生成配置文件

    jupyter server --generate-config

该命令会在 ~/.jupyter 目录下生成配置文件 jupyter_server_config.py, 如果该配置文件已经存在,则会提示是否替换该文件。

  • 手动设置密码

    jupyter server password
  • 启动Jupyter

    # 后台启动
      nohup jupyter-lab --ip=0.0.0.0 --port=8088 --allow-root --notebook-dir=/data/workspace/PaddleDetection/ > /dev/null &l &

安装NVDashboard插件

该插件依赖nodejs,安装插件之后重启Jupyter

conda install -c conda-forge/label/cf202003 nodejs

要求

  • JupyterLab >= 3.0

安装

pip install jupyterlab_nvdashboard

疑难解答

如果您看到前端扩展,但它不工作,请检查服务器扩展是否已启用:

jupyter server extension list

如果服务器扩展已安装并启用,但您没有看到前端扩展,请检查前端扩展是否已安装:

jupyter labextension list

文章作者: Kevin
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 Kevin !
评论
  目录