nextflow icon indicating copy to clipboard operation
nextflow copied to clipboard

Inspect command improvement for Singularity

Open pditommaso opened this issue 1 month ago • 20 comments

The inspect command reports the container used during a pipeline execution, for example:

» nextflow inspect . -profile wave
{
    "processes": [
        {
            "name": "RNASEQ:INDEX",
            "container": "community.wave.seqera.io/library/salmon:1.10.2--fd38303983e26319"
        },
        {
            "name": "RNASEQ:QUANT",
            "container": "community.wave.seqera.io/library/salmon:1.10.2--fd38303983e26319"
        },
        {
            "name": "MULTIQC",
            "container": "community.wave.seqera.io/library/multiqc:1.17--aa7f4f58d1a63e37"
        },
        {
            "name": "RNASEQ:FASTQC",
            "container": "community.wave.seqera.io/library/fastqc:0.12.1--0d48a4f85934912a"
        }
    ]
}

The inspect command is enable to detected the container engine and reflect the corresponding container names. For example using Sngularity, the images SIF files are uploaded to the registry and the oras:// scheme is used

{
    "processes": [
        {
            "name": "RNASEQ:INDEX",
            "container": "docker://community.wave.seqera.io/library/salmon:1.10.2--fd38303983e26319"
        },
        {
            "name": "RNASEQ:QUANT",
            "container": "docker://community.wave.seqera.io/library/salmon:1.10.2--fd38303983e26319"
        },
        {
            "name": "MULTIQC",
            "container": "docker://community.wave.seqera.io/library/multiqc:1.17--aa7f4f58d1a63e37"
        },
        {
            "name": "RNASEQ:FASTQC",
            "container": "docker://community.wave.seqera.io/library/fastqc:0.12.1--0d48a4f85934912a"
        }
    ]
}

However, there are use cases in which users prefer to use plain HTTP protocol to download the SIF image instead of the oras pseudo protocol.

The goal of this issue is to add at a new option to the inspect command, so the the HTTP URL of the SIF tarbal is retuned in place of oras URL.

Implementation

This capability can be implemented using the Wave inspect API for each container images returned by the current implementation. Once acquired the inspect payload it should be inferred the HTTP URL of the layer tarbal (note a singularity image only contained *one* tarbal that corresponds to the SIF image)

An example can be found here and here

pditommaso avatar May 15 '24 12:05 pditommaso