Skip to content

Pipeline download feature does not appear to handle Docker image conversion correctly #3742

Description

@scwatts

Overview

Recent changes to the nf-core pipelines download feature appear to have introduced a bug during the conversion of Docker images to Singularity SIF files, and impacts the ability to successfully run the download_pipeline.yml GH Action workflow jobs

The cause is likely related to different output filepaths / filenames of the converted Docker images:

previously: nf-core-gridss-2.13.2--1.img
now:        nf-core-gridss-2.13.2--1.img/tempfile

In the context of the relevant GH Action workflow, the 'Download the pipeline' step completes successfully but the 'Run the downloaded pipeline' step fails with the following error:

  INFO:    Environment variable SINGULARITYENV_NXF_TASK_WORKDIR is set, but APPTAINERENV_NXF_TASK_WORKDIR is preferred
  INFO:    Environment variable SINGULARITYENV_NXF_DEBUG is set, but APPTAINERENV_NXF_DEBUG is preferred
  WARNING: passwd file doesn't exist in container, not updating
  WARNING: group file doesn't exist in container, not updating
  WARNING: Skipping mount /tmp [tmp]: /tmp doesn't exist in container
  WARNING: Skipping mount /var/tmp [tmp]: /var/tmp doesn't exist in container
  FATAL:   stat /bin/bash: no such file or directory

I expect this is because the singularity command isn't receiving the actual SIF file but rather the directory containing the SIF file, which is now named tempfile

Additional information

Example GH Actions runs

To help you debug, I have two useful GH Action workflow runs:

  • an example of the above failure in oncoanalyser with the latest nf-core/tools dev codebase (link), and
  • the same oncoanalyser version but with the nf-core/tools codebase prior to the download refactor (link)

Minimal, locally reproducible example

I have also put together a minimal reproducible example that you can use to debug locally:

# Get software
conda create -y -n run nextflow==25.04.* python==3.13.* apptainer==1.3.* gcc clang gxx clangxx
conda activate run

python3 -m venv venv/
. venv/bin/activate

python -m pip install --upgrade pip

# NOTE(SW): pinned to latest commit on `dev` at time of writting
#pip install git+https://github.com/nf-core/tools.git@dev
pip install git+https://github.com/nf-core/tools.git@e98ae9b


# Download images
mkdir -p ./singularity_container_images

export NXF_SINGULARITY_CACHEDIR=./singularity_container_images

nf-core pipelines download nf-core/oncoanalyser \
  --revision nf-core-tools-download-mre \
  --outdir ./oncoanalyser \
  --compress "none" \
  --container-system 'singularity' \
  --container-library "quay.io" -l "docker.io" -l "community.wave.seqera.io/library/" \
  --container-cache-utilisation 'amend' \
  --download-configuration 'yes'


# Run test, trigger error
export NXF_SINGULARITY_CACHEDIR=./singularity_container_images
export NXF_SINGULARITY_HOME_MOUNT=true

nextflow run ./oncoanalyser/nf_core_tools_download_mre \
  -profile test,singularity \
  --outdir ./results

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions