美文网首页
Ubuntu服务器上配置Jupyter并在后台运行

Ubuntu服务器上配置Jupyter并在后台运行

作者: 平头哥2 | 来源:发表于2023-02-19 10:02 被阅读0次
  1. 安装jupyter
  2. 生成配置文件
jupyter notebook --generate-config --allow-root

配置文件的位置在:
~/.jupyter/jupyter_notebook_config.py

  1. 生成用于登录 的密码
jupyter notebook password
  1. 修改配置文件
    修改ip, 默认为localhost:
sed -ie "s/#c.NotebookApp.ip = 'localhost'/c.NotebookApp.ip = '0.0.0.0'/g" ~/.jupyter/jupyter_notebook_config.py
  • 修改port, 默认为8888:
 sed -ie 's/#c.NotebookApp.port = 8888/c.NotebookApp.port = 9999/g' ~/.jupyter/jupyter_notebook_config.py
  1. 后台启动Jupyter
nohup jupyter notebook --allow-root > jupyter.log 2>&1 &
  1. 浏览器访问:
    • 打开浏览器,输入 Jupyter服务器的ip:8000
    • 进入登陆页面后,输入刚刚设置的密码即可

相关文章

网友评论

      本文标题:Ubuntu服务器上配置Jupyter并在后台运行

      本文链接:https://www.haomeiwen.com/subject/vajikdtx.html