Mic*_*l D 13 gnu-screen remote-access remote-server jupyter jupyter-notebook
我使用连接到远程服务器,ssh -L
但如果我关闭笔记本电脑盖或连接丢失,jupyter笔记本电脑将断开连接.
重新连接到远程服务器后,"最后"会话丢失.
可以做些什么让它持久?可以screen
帮忙吗?
BiB*_*iBi 19
在远程服务器上,您应该在screen
会话中打开您的jupyter,如果您丢失与服务器的连接并恢复它,它将使其保持持久性.
ssh -L xxxx:localhost:yyyy server
.screen
.jupyter notebook --no-browser --port=yyyy
.localhost:xxxx
.要手动断开连接并重新连接:
control + a
然后d
.control + d
ssh -L xxxx:localhost:yyyy
.screen -r
.localhost:xxxx
.持久化 Jupyter 服务器会话的标准用法是使用nohup
和&
;在具有 IP 地址的远程服务器中xx.xx.xx.xx
:
nohup jupyter notebook --no-browser --ip xx.xx.xx.xx --port yyyy &
Run Code Online (Sandbox Code Playgroud)
现在,即使您关闭笔记本电脑或失去连接,您也始终可以通过将浏览器指向 xx.xx.xx.xx:yyyy
归档时间: |
|
查看次数: |
7005 次 |
最近记录: |