I have done a very similar project using BeagleBone and Python which the related code can be found here:
https://github.com/mahyaret/MiniAutomation
tmux
. I start tmux, start the operation and go on my way. If I return and find the connection has been broken, all I have to do is reconnect and type tmux attach
Make sure to follow the steps from this post to setup your Azure Virtual Machine:
http://www.etedal.net/2019/03/setting-up-azure-nc6-for-kaggle.html
Setup Jupyter remote ssh connection:
On Azure: jupyter notebook --no-browser --port=2001
On your machine: ssh -N -f -L localhost:2002:localhost:2001 remoteuser@remotehost
(Optional if you use mosh instead): mosh -ssh "
ssh -N -f -L localhost:2002:localhost:2001" remoteuser@remotehostOn your browser: localhost:2002
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux