From 5f7509da84eefcfe9841ddb0e7fe8a1bddfa3ca4 Mon Sep 17 00:00:00 2001 From: FriederikeHanssen Date: Fri, 7 Aug 2026 19:47:26 +0200 Subject: [PATCH] move containeroptionsinto module --- modules/nf-core/gatk4spark/applybqsr/main.nf | 8 ++++++++ modules/nf-core/gatk4spark/baserecalibrator/main.nf | 8 ++++++++ modules/nf-core/gatk4spark/markduplicates/main.nf | 8 ++++++++ 3 files changed, 24 insertions(+) diff --git a/modules/nf-core/gatk4spark/applybqsr/main.nf b/modules/nf-core/gatk4spark/applybqsr/main.nf index 4aec53545cb6..3a81f4169473 100644 --- a/modules/nf-core/gatk4spark/applybqsr/main.nf +++ b/modules/nf-core/gatk4spark/applybqsr/main.nf @@ -7,6 +7,14 @@ process GATK4SPARK_APPLYBQSR { ? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/49/498aea9c9bcaf736b9fb2a01366c1b7b38ccc0d38143178afc325d6a93241447/data' : 'community.wave.seqera.io/library/gatk4-spark:4.6.2.0--8b5cd67ee60a714e'}" + // Spark's native UnixLoginModule fails to resolve a username for the container's UID + // (LoginException: invalid null input: name), because the container's own /etc/passwd + // has no entry for the host UID that docker.runOptions maps it to. Bind-mounting the + // host's /etc/passwd/group (which do have that entry) fixes the native lookup. + containerOptions { workflow.containerEngine in ['singularity', 'apptainer'] + ? '--bind /etc/passwd:/etc/passwd:ro,/etc/group:/etc/group:ro' + : '-v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro' } + input: tuple val(meta), path(input), path(input_index), path(bqsr_table), path(intervals) path fasta diff --git a/modules/nf-core/gatk4spark/baserecalibrator/main.nf b/modules/nf-core/gatk4spark/baserecalibrator/main.nf index 2b8deb171f86..88998549bcfb 100644 --- a/modules/nf-core/gatk4spark/baserecalibrator/main.nf +++ b/modules/nf-core/gatk4spark/baserecalibrator/main.nf @@ -7,6 +7,14 @@ process GATK4SPARK_BASERECALIBRATOR { ? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/49/498aea9c9bcaf736b9fb2a01366c1b7b38ccc0d38143178afc325d6a93241447/data' : 'community.wave.seqera.io/library/gatk4-spark:4.6.2.0--8b5cd67ee60a714e'}" + // Spark's native UnixLoginModule fails to resolve a username for the container's UID + // (LoginException: invalid null input: name), because the container's own /etc/passwd + // has no entry for the host UID that docker.runOptions maps it to. Bind-mounting the + // host's /etc/passwd/group (which do have that entry) fixes the native lookup. + containerOptions { workflow.containerEngine in ['singularity', 'apptainer'] + ? '--bind /etc/passwd:/etc/passwd:ro,/etc/group:/etc/group:ro' + : '-v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro' } + input: tuple val(meta), path(input), path(input_index), path(intervals) path fasta diff --git a/modules/nf-core/gatk4spark/markduplicates/main.nf b/modules/nf-core/gatk4spark/markduplicates/main.nf index 2278afa1ef78..ed3ff8ef3bc8 100644 --- a/modules/nf-core/gatk4spark/markduplicates/main.nf +++ b/modules/nf-core/gatk4spark/markduplicates/main.nf @@ -7,6 +7,14 @@ process GATK4SPARK_MARKDUPLICATES { ? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/49/498aea9c9bcaf736b9fb2a01366c1b7b38ccc0d38143178afc325d6a93241447/data' : 'community.wave.seqera.io/library/gatk4-spark:4.6.2.0--8b5cd67ee60a714e'}" + // Spark's native UnixLoginModule fails to resolve a username for the container's UID + // (LoginException: invalid null input: name), because the container's own /etc/passwd + // has no entry for the host UID that docker.runOptions maps it to. Bind-mounting the + // host's /etc/passwd/group (which do have that entry) fixes the native lookup. + containerOptions { workflow.containerEngine in ['singularity', 'apptainer'] + ? '--bind /etc/passwd:/etc/passwd:ro,/etc/group:/etc/group:ro' + : '-v /etc/passwd:/etc/passwd:ro -v /etc/group:/etc/group:ro' } + input: tuple val(meta), path(bam) path fasta