Answers.Body: <p>Assuming your user is in the group permitted to use docker:</p>
  
  <pre><code>docker pull quay.io/biocontainers/tophat:2.1.1--py27_3
  nohup docker run -v /some/path:/data quay.io/biocontainers/tophat:2.1.1--py27_3 tophat2 ... &amp;
  </code></pre>
  
  <p>The only thing to remember is to mount everything you'll need into the docker container (<code>/data</code> in the example above). If you need to debug things then you can add the <code>-it</code> flag to <code>docker run</code> and use <code>bash</code> as the command.</p>
  
  <p>As an aside, you might find using <code>screen</code> or <code>tmux</code> preferable to <code>nohup ... &amp;</code>, since you can reconnect to sessions with them.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-13T07:10:03.690Z
Answers.LastActivityDate: 2020-02-13T07:10:03.690Z
Answers.UserDisplayName: Devon Ryan
Body: <p>I need to use tophat2 to align some sequences, and I wish to use the docker container. These are large sequences so it will take a long time, plus I'm working on a university server so the chances of being kicked off the server are very high. How can I use nohup and &amp; to run tophat2 through docker, if I need some user interaction?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-12T18:35:23.587Z
Comments.Text: Do you have root access? Docker generally requires root (as it normally is systemctl service and hard/janky to use otherwise)... Does the server not have a queuing system? Or is this a classic furtive job in the login node of an oversubscribed cluster? Also if an admin may kill a nohup job, they may kill your docker job.
Comments.UserDisplayName: Matteo Ferla
Tags: <phylogenetics><bash><docker>
Title: Running tophat dockerfile in background
ThreadText: # Running tophat dockerfile in background
  
  (Asked by: username_0 on 2020-02-12)
  
  I need to use tophat2 to align some sequences, and I wish to use the docker container. These are large sequences so it will take a long time, plus I'm working on a university server so the chances of being kicked off the server are very high. How can I use nohup and & to run tophat2 through docker, if I need some user interaction?
  
  **Tags:** phylogenetics, bash, docker
  
  > **Comments:**
  > **username_1**: Do you have root access? Docker generally requires root (as it normally is systemctl service and hard/janky to use otherwise)... Does the server not have a queuing system? Or is this a classic furtive job in the login node of an oversubscribed cluster? Also if an admin may kill a nohup job, they may kill your docker job.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2020-02-13. Score: 2
  
  Assuming your user is in the group permitted to use docker:
  
  ```
  docker pull quay.io/biocontainers/tophat:2.1.1--py27_3
  nohup docker run -v /some/path:/data quay.io/biocontainers/tophat:2.1.1--py27_3 tophat2 ... &
  
  ```
  
  The only thing to remember is to mount everything you'll need into the docker container (`/data` in the example above). If you need to debug things then you can add the `-it` flag to `docker run` and use `bash` as the command.
  
  As an aside, you might find using `screen` or `tmux` preferable to `nohup ... &`, since you can reconnect to sessions with them.
  
  
  ---
  
  