赞
踩
本篇文章主要介绍如何通过内网连接服务器的jupyter服务。主要做法就是变更服务器的jupyter服务里的内网连接功能的选择。
在服务器中,默认情况下,这个文件是存在于/home/你的用户名/.jupyter/jupyter_notebook_cofig.py
这个位置
如果你在该文件夹下是找不到jupyter_notebook_cofig.py
,这需要生成一个,代码如下:
jupyter notebook --generate-config
这个时候就能在该路径下找到jupyter_notebook_cofig.py
文件了
这里一共要修改两处
第一点,将local
改成你服务器的IP地址,并且取消注释
# c.NotebookApp.ip = 'local'
---> c.NotebookApp.ip = '192.xx.xx.xx'
第二点,将False
改成True
,并且取消注释
# c.NotebookApp.allow_remote_access = 'False'
---> c.NotebookApp.allow_remote_access = 'True'
至此,你就可以在服务器上运行jupyter后,通过内网在其他电脑使用了
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。