Search code examples
pythonsshpycharmremote-accessremote-server

Persistent remote session on Pycharm


I am using Pycharm pro 2016.1 to train some models on a remote server. I have a remote interpreter setup.

Occasionally there might be an accidental disconnect, which disrupts the whole process, I get disconnects and the scripts stop running. I was wondering if there is a way to establish a persistent session when running my scripts, such that if I disconnect, the scripts keep running? Thanks


Solution

  • The way I solved this is by using a terminal multiplexer such as tmux: https://github.com/tmux/tmux/wiki

    it allows you to "detach" a session, in which case the remote session is not dependent on the state of the local machine. You can then "attach" that session back and manage it remotely.