Singularity for samtools
- Singularity 2.2 must be installed on your system. Here is the instruction.
-
Download
Singularity
file from this git repository. -
Create an empty container image of 200MB:
$ sudo singularity create -s 200 samtools.img
-
Bootstrap the image using the
Singularity
image definition file you downloaded from the previous step:$ sudo singularity bootstrap samtools.img Singularity
$ singularity run samtools.img --help
- This uses Alpine Linux as base image.
- Note that the image definition file being used here contains a bunch of commands that downloads and compiles the source code of samtools, which is the main reason why the container image requires about 200MB. It would be nice if Singularity provides a way to shrink the image down to the only necessary size. Another workaround would be
Dockerfile
.