Jump to:
We have covered creating a docker image and pushing it to Dockerhub. Next, we can use Singularity to pull the image locally, creating an executable container.
This is a slightly obtuse way of creating containers - utilising both Docker and Singularity - however in my opinion pushing images to dockerhub comes with benefits:
To pull a docker container, use the following singularity command specifying the name of the image to create and the Dockerhub repostiory to pull from:
singularity pull --name week1.img docker://USERNAME/REPO:TAG
You will now have created an image called week1.img.
To ‘enter’ the container interactively and to utilise its tools, use the singularity shell command:
singularity shell -B $(pwd) week1.img
The -B prefix specifies the bind path. Once inside the container, the container cannot “see” files that are in directories above the bind path specified. We used $(pwd) which is the same as the current directory path.
fastqc, multiqc and bbduk.sh all work.whereis to print the path of each tool within the container. Can you see where conda installed the environment?