title: Create docker instance and then wait for requests
body: <p>I am looking at &quot;dockerising&quot; a neural network based comparison engine.   It takes quite a while to initialise the neural network but the actual comparisons are very quick.</p>
  <p>Mostly when i see docker instances being started up they run a single process then exit.  However the overhead of continually reloading the neural network to perform a few comparisons is extreme.</p>
  <p>Ideally the docker instance would be fired up, the neural network loaded and then sit and wait for incoming requests.</p>
  <p>Is there a standard library or such like for firing up a docker instance that then sits and waits for requests to come in?  Such a thing would need to timeout at some point to shut the docker instance down if its not needed.   Its not the hardest thing to write but im sure there are plenty of corner cases and I'm a huge fan of not reinventing the wheel.</p>
  <p>How is this usually approached?</p>