jupyter 访问远端服务器端口

Use Jupyter notebook remotely

Posted by 朱晓旭 on January 14, 2020
  1. 安装jupyter及其依赖

    conda install jupyter

  2. 创建并写入配置文件

    vim ~/.jupyter/jupyter_notebook_config.py
    c.NotebookApp.ip = ‘xxx.xxx.xxx.xxx’(IP地址)
    c.NotebookApp.open_browser = False
    c.NotebookApp.port = 1024
    c.NotebookApp.allow_remote_access = True (允许远端)
    c.NotebookApp.disable_check_xsrf = True ( 不加这句无法读取html里面的wav文件和图像,他的作用是不会检查x权限,即执行权限。)

  3. 生成密码

    可以设置为空,c.NotebookApp.token = ' ';若是设置其他需要在配置文件里加入改行信息c.NotebookApp.password = u”哈希码”

    jupyter notebook password

  4. 在想要访问的目录下启动jupyter,不挂起后台运行

    nohup jupyter notebook –allow-root 2>&1 &