1288Meow
1288Meow

Reputation: 339

DEPRECATED USAGE: Forwarding SINGULARITYENV_TMP as environment variable will not be supported (Nextflow)

I have a nextflow workflow using a singularity .sif file for one of the processes.

After running my workflow I saw in the logs the following message:

WARNING: DEPRECATED USAGE: Forwarding SINGULARITYENV_TMP as environment variable will not be supported in the future, use APPTAINERENV_TMP instead 
WARNING: DEPRECATED USAGE: Forwarding SINGULARITYENV_TMPDIR as environment variable will not be supported in the future, use APPTAINERENV_TMPDIR instead 
WARNING: DEPRECATED USAGE: Forwarding SINGULARITYENV_NXF_DEBUG as environment variable will not be supported in the future, use APPTAINERENV_NXF_DEBUG instead

My nextflow.config looks like this

singularity {
    enabled = true
    autoMounts = true
}

conda {
    conda = './env.yml'
    enabled = true
}

//Wynton process Config
process {
    executor = "sge"
    scratch = true
    stageInMode = "copy"
    stageOUtMode="move"
    errorStrategy = "retry"
    clusterOptions = "-S /bin/bash -o job.log -e job.err"

    withName: PROCESS_1 {
        conda = './env.yml'

    withName: SINGULARITY_PROGRAM {
        container = 'program.sif'
    }
    ...
}

Upvotes: 1

Views: 688

Answers (1)

Steve
Steve

Reputation: 54512

Singularity was renamed to Apptainer when the project moved to the Linux Foundation. All $SINGULARITYENV_* environment variables have been deprecated and will be removed in later releases of Apptainer. Note that Apptainer will warn you when it sees SINGULARITYENV environment variables. I suspect you get these warnings because your singularity is probably a symlink to apptainer, which is the case when installing version 1.1.3 for example.

Nextflow support for the Apptainer container engine was added in version 22.11.0-edge just six days ago. This edge release now has the following command line option:

    -with-apptainer
       Enable process execution in a Apptainer container

To enable it in the Nextflow config, add to (or replace the singularity block with) your Nextflow config the following:

apptainer {
    enabled = true
    autoMounts = true
}

And run your workflow using the latest release:

NXF_VER=22.11.0-edge nextflow run

Upvotes: 1

Related Questions