【发布时间】:2017-09-18 10:07:40
【问题描述】:
我在远程 Google 云计算实例上有几个长时间运行的脚本(在 Jupyter Notebook 中)。
如果我失去了 ssh 连接,我无法在不停止那些正在运行的脚本(在笔记本中执行)的情况下重新连接到(正在运行的)笔记本。
关闭我的 macbook 似乎会切断我与远程(正在运行的)jupyter 笔记本的连接。有什么方法可以在不停止脚本的情况下重新连接?
在 Google Cloud 上,Jupyter仍在运行。我只是无法连接到执行代码的笔记本——不停止代码执行。
我相信其他 Jupyter 用户已经明白了这一点 :) 提前致谢
我的 GCloud 隧道脚本
gcloud compute ssh --zone us-central1-c my-compute-instance -- -N -p 22 -D localhost:5000
启动 Chrome 的 Bash 脚本
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
"localhost:22"
--proxy-server="socks5://localhost:5000"
--host-resolver-rules="MAP * 0.0.0 , EXCLUDE localhost"
--user-data-dir=/tmp/
Nohup 在 Gcloud 上启动 Jupyter
nohup jupyter notebook --no-browser > log.txt 2>&1 &
- 在我的 Sierra-os macbook 上,没有启用代理设置(系统偏好设置)
- 在 Google Cloud 上,我没有使用静态 ip,而是使用临时 ip。
提前多谢
【问题讨论】:
标签: jupyter-notebook gcloud jupyter-lab