Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Where the entrypoint.sh first activates the target conda environment and then takes the arguments of the containers' commandline command line to run as subsequent command:

...

On HPC systems of KSL, we use Singularity as our container platform to run containers. For this we pull the image we worked with to bring it on Ibex. Singularity understands Singularity Image Format and the singularity pull or singularity build command creates one from the docker image. By default, Singularity disables any entrypoint behavior in docker images. To re-enable the entrypoint we will rebuild the genomad image into a SIF format using a Singularity definition file which describes what to change in the base docker image. Our singularity definition file genomad.def is pretty minimal. It activates the target conda Conda environment and allows running any command passed on singularity command line:

...

In the genomad.def file shown above, we first pull our docker image from DockerHub. They add instructions to enable running a script upon creation of a container, which activates our conda Conda environment.

Building the SIF images is only possible on Ibex compute nodes. We therefore write a SLURM jobscript job script to submit the build process to run on a compute node using singularity fakeroot feature. fakeroot is required because the building of Singaularity Singularity images from Singularity definition files requires a temporary privilege escalation. The jobscirpt job script looks as follows:

Code Block
#!/bin/bash

#SBATCH -n 1 
#SBATCH -t 00:10:00 

module load singularity

singularity build --fakeroot --force ./genomad.sif ./geomad.def

...