title: How to leave my training process running after I exit the container and ssh?
body: <p>I'm training a model on AWS, and my workflow is:</p>
  <ol>
  <li>Connect to the EC2 instance via <code>ssh</code></li>
  <li>Start the Docker container if not running already</li>
  <li><code>docker exec -it &lt;container_name&gt; bash</code></li>
  <li><code>python train.py</code></li>
  </ol>
  <p>I can use <code>Ctrl+Z</code> to put the Python process in the background. However, I cannot exit the container shell, because the training process is attached to it. I assume it will also exit if I disconnect from ssh entirely (laptop shuts down, I close the terminal, etc.)</p>
  <p>I thought that running <code>python train.py &amp;</code> would fix it, but the training process is still stopped.</p>
  <p>What's the best/most common way of accomplishing this?</p>