AWS实例在运​​行大量计算时挂起

时间:2016-10-30 00:47:37

标签: amazon-web-services amazon-ec2

我正在AWS EC2实例中的图像识别数据集上运行ML算法。该算法需要很长时间(> 6)小时才能运行,而且我不确定如何在这段时间内保持该实例。

我尝试了几次代码,看到一小时左右后连接丢失了。我该如何防止这种情况发生。

为了提供更多细节,我正在从jupyter笔记本运行一个Convolution神经网络。我使用AWS的端口转发从本地计算机访问这个jupyter笔记本 https://coderwall.com/p/ohk6cg/remote-access-to-ipython-notebooks-via-ssh#comment_28219

提前致谢

1 个答案:

答案 0 :(得分:2)

尝试在屏幕上运行命令(或代码)。请参阅https://www.rackaid.com/blog/linux-screen-tutorial-and-how-to/。这可确保即使ssh连接断开,您的命令仍会在后台运行。 ssh再次打开屏幕。

重要命令:

screen -S <name> : creates the screen 
screen -ls : list all screens
screen -r <name> : restore the screen
相关问题