美文网首页
配置jupyter notebook于本地浏览器可视化远程服务器

配置jupyter notebook于本地浏览器可视化远程服务器

作者: sh_scaler | 来源:发表于2018-07-10 17:56 被阅读0次
  1. 登录远程服务器
$ ssh test@10.219.118.63
  1. 生成配置文件
$ jupyter notebook --generate-config
  1. 生成密码
$ ipython
In [1]: from notebook.auth import passwd
In [2]: passwd() #需要输入密码
Enter password: 
Verify password: 
Out[2]: 'sha1:368a0fb6eef4:720baa4f5e5bd195a7fa088xxxx1'
  1. 修改默认配置文件
$ vim ~/.jupyter/jupyter_notebook_config.py
# 进行如下修改
c.NotebookApp.ip='10.219.8.254'
c.NotebookApp.password=u'sha1:368a0fb6eef4:720baa4f5e5bd195a7fa088xxxx1'
c.NotebookApp.open_brower=False
c.NotebookApp.port=8888
  1. 启动jupyterbook:
$ jupyter notebook --allow-root
[I 12:03:11.888 NotebookApp] Serving notebooks from local directory: /home/test/work
[I 12:03:11.888 NotebookApp] 0 active kernels
[I 12:03:11.888 NotebookApp] The Jupyter Notebook is running at:
[I 12:03:11.888 NotebookApp] http://10.219.118.63:8888/
[I 12:03:11.888 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[I 12:03:28.086 NotebookApp] 302 GET / (10.219.118.12) 0.65ms
[I 12:03:28.111 NotebookApp] 302 GET /tree? (10.219.118.12) 0.68ms
[I 12:03:33.263 NotebookApp] 302 POST /login?next=%2Ftree%3F (10.219.118.12) 1.42ms

  • 在本地打开浏览器,输入http://10.219.118.63:8888/即可看到服务器上的所有文件夹,并可用过jupyter notebook 运行python,shell脚本,另外可用显示功能(而直接ssh远程登录服务器是不能显示图像的)

相关文章

网友评论

      本文标题:配置jupyter notebook于本地浏览器可视化远程服务器

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