远程jupyter notebook
安装
https://jupyter.readthedocs.io/en/latest/install/notebook-classic.html
pip3 install –upgrade pip
pip3 install jupyter
设置远程
https://jupyter-notebook.readthedocs.io/en/latest/public_server.html#notebook-server-security
jupyter notebook –generate-config
第一次启动会提醒设置新密码
不能修改的话可能是因为设置里面的–NotebookApp.allow_password_change=False
重置或设置密码
jupyter notebook password
设置哈希密码
1 | from notebook.auth import passwd |
设置公钥和私钥进行加密通讯
使用openssl创建为期一年的钥匙
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout mykey.key -out mycert.pem
最精简设置
1 | # Set options for certfile, ip, password, and toggle off |
用screen创建新窗口运行
jupyter notebook
遗留问题
自己创建的公钥和私钥不被浏览器识别,会显示不安全
官方文档里有用Let’s Encrypt消除不安全标识的方法,个人没有需要所以没有进一步配置
- Post title:远程jupyter notebook
- Post author:Willem Zhang
- Create time:2021-05-03 09:02:23
- Post link:https://ataraxia.top/2021/05/03/远程jupyter-notebook/
- Copyright Notice:All articles in this blog are licensed under BY-NC-SA unless stating additionally.
Comments