title: singularity extract, edit, and rebuild image
body: <p>I have a singularity container that has been made for me (to run tensorflow on comet GPU nodes) but I need to modify the keras install for my purposes. </p>
  
  <p>I understand that <code>.simg</code> files are not editable (and that the writable <code>.img</code> format is deprecated), so the process of converting to an <code>.img</code> file, editing, and then converting back to <code>.simg</code> is discouraged:</p>
  
  <pre><code>sudo singularity build --writable development.img production.simg
  ## make changes
  sudo singularity build production2.img development.simg
  </code></pre>
  
  <p>It seems to me the best way might be to extract the contents (say into a <em>sandbox</em>), edit them, and then rebuild the sandbox into an <code>.simg</code> image.</p>
  
  <p>I know how to do the second conversion (<code>singularity build new-sif sandbox</code>), but how can I do the first?</p>
  
  <p>I have tried the following, but the command never finishes:</p>
  
  <pre><code>sudo singularity build tf_gpu tensorflow-gpu.simg
  WARNING: Authentication token file not found : Only pulls of public images will succeed
  Build target already exists. Do you want to overwrite? [N/y] y
  2018/10/12 08:39:54 bufio.Scanner: token too long
  INFO:    Starting build...
  </code></pre>