From aa23854bede0e4f1ab002ea0217c700fd39fed8a Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Wed, 22 Apr 2026 10:10:09 +0100 Subject: [PATCH 1/6] fix: update ribodetector GPU container to CUDA 12.x Update GPU container from PyTorch 1.11.0 (CUDA 11.1, March 2022) to PyTorch 2.10.0 (CUDA 12.9) and pin cuda-version>=12,<13 in environment.gpu.yml to keep the solver within supported CUDA versions. The old GPU container used PyTorch 1.11.0 because it was the last version whose conda dependencies did not require the __cuda virtual package, which is absent on Wave's GPU-less build servers. Wave now handles this automatically via a two-pass solve (seqeralabs/wave#1027), so we can build containers with current PyTorch. Co-Authored-By: Claude Opus 4.7 (1M context) --- modules/nf-core/ribodetector/environment.gpu.yml | 3 ++- modules/nf-core/ribodetector/main.nf | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/nf-core/ribodetector/environment.gpu.yml b/modules/nf-core/ribodetector/environment.gpu.yml index 221fb0a83086..bda33be1b84f 100644 --- a/modules/nf-core/ribodetector/environment.gpu.yml +++ b/modules/nf-core/ribodetector/environment.gpu.yml @@ -5,4 +5,5 @@ channels: - bioconda dependencies: - "bioconda::ribodetector=0.3.3" - - "conda-forge::pytorch-gpu=1.11.0" + - "conda-forge::pytorch-gpu=2.10.0" + - "conda-forge::cuda-version>=12,<13" diff --git a/modules/nf-core/ribodetector/main.nf b/modules/nf-core/ribodetector/main.nf index f85b86a62d40..c49d694caca8 100644 --- a/modules/nf-core/ribodetector/main.nf +++ b/modules/nf-core/ribodetector/main.nf @@ -4,8 +4,8 @@ process RIBODETECTOR { conda "${ task.accelerator ? "${moduleDir}/environment.gpu.yml" : "${moduleDir}/environment.yml" }" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - (task.accelerator ? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/eb/ebcccef2cd8b4c10d4bbd8fce542b46502b7817115cb144b9566792b0aac9bc0/data' : 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/46/463b8ad941e7f1f2decef20844d666c1c8ac233e166d2bc766164c4a93905a3c/data') : - (task.accelerator ? 'community.wave.seqera.io/library/ribodetector_pytorch-gpu:f2d45093d4093307' : 'community.wave.seqera.io/library/ribodetector:0.3.3--ad3d7071e408b502') }" + (task.accelerator ? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/b7/b71fb81b909f9d1e1090e3d1d8f10b9da95405bed1d0f01a6be71f0ef0b51170/data' : 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/46/463b8ad941e7f1f2decef20844d666c1c8ac233e166d2bc766164c4a93905a3c/data') : + (task.accelerator ? 'community.wave.seqera.io/library/ribodetector_pytorch-gpu_cuda-version:811a681473448f10' : 'community.wave.seqera.io/library/ribodetector:0.3.3--ad3d7071e408b502') }" input: tuple val(meta), path(fastq) From 9462ebb82ee368ebfb773e2fc79150a3804bce3b Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Wed, 22 Apr 2026 12:43:34 +0100 Subject: [PATCH 2/6] fix(ribodetector): pin pytorch-gpu=2.1.0 + cuda-version=11.2 for widest host compat Reframes the GPU-container refresh. The motivation here is not to chase a newer PyTorch version; it's to unpin from 1.11.0, which was the last release whose conda dependencies avoided the __cuda virtual package. Wave #1027 (merged) removes that constraint, so any post-1.11 pytorch-gpu can now be built. Given ribodetector is an inference-only CNN from 2022 and has no use for newer PyTorch features, the lowest post-__cuda pytorch-gpu on conda-forge that has a py<=3.10 + low-CUDA build is pytorch-gpu=2.1.0 with cuda-version=11.2. This maps to an NVIDIA driver floor of ~450 (2020), covering essentially every current HPC GPU host - far wider than the bleeding-edge 2.10.0 + cuda-version=12.9 combination (driver floor 575, early 2025). Address mashehu's review: - Exact pins, no ranges (nf-core policy). - cuda runtime version captured as a versions topic emit so the container's CUDA minor is visible in downstream provenance reports. Reports `cpu` on the non-GPU path. Container hashes regenerated from the new environment.gpu.yml; the CPU container is unchanged (environment.yml not touched). Co-Authored-By: Claude Opus 4.7 (1M context) --- .../nf-core/ribodetector/environment.gpu.yml | 4 ++-- modules/nf-core/ribodetector/main.nf | 5 +++-- modules/nf-core/ribodetector/meta.yml | 19 +++++++++++++++++++ 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/modules/nf-core/ribodetector/environment.gpu.yml b/modules/nf-core/ribodetector/environment.gpu.yml index bda33be1b84f..af9b9052ddad 100644 --- a/modules/nf-core/ribodetector/environment.gpu.yml +++ b/modules/nf-core/ribodetector/environment.gpu.yml @@ -5,5 +5,5 @@ channels: - bioconda dependencies: - "bioconda::ribodetector=0.3.3" - - "conda-forge::pytorch-gpu=2.10.0" - - "conda-forge::cuda-version>=12,<13" + - "conda-forge::pytorch-gpu=2.1.0" + - "conda-forge::cuda-version=11.2" diff --git a/modules/nf-core/ribodetector/main.nf b/modules/nf-core/ribodetector/main.nf index c49d694caca8..bd7ed14150d0 100644 --- a/modules/nf-core/ribodetector/main.nf +++ b/modules/nf-core/ribodetector/main.nf @@ -4,8 +4,8 @@ process RIBODETECTOR { conda "${ task.accelerator ? "${moduleDir}/environment.gpu.yml" : "${moduleDir}/environment.yml" }" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - (task.accelerator ? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/b7/b71fb81b909f9d1e1090e3d1d8f10b9da95405bed1d0f01a6be71f0ef0b51170/data' : 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/46/463b8ad941e7f1f2decef20844d666c1c8ac233e166d2bc766164c4a93905a3c/data') : - (task.accelerator ? 'community.wave.seqera.io/library/ribodetector_pytorch-gpu_cuda-version:811a681473448f10' : 'community.wave.seqera.io/library/ribodetector:0.3.3--ad3d7071e408b502') }" + (task.accelerator ? 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/51/51100097fc2e31d7b78074bc954774f77726099220e820382e939278817a66da/data' : 'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/46/463b8ad941e7f1f2decef20844d666c1c8ac233e166d2bc766164c4a93905a3c/data') : + (task.accelerator ? 'community.wave.seqera.io/library/ribodetector_pytorch-gpu_cuda-version:fa9183da731515ea' : 'community.wave.seqera.io/library/ribodetector:0.3.3--ad3d7071e408b502') }" input: tuple val(meta), path(fastq) @@ -15,6 +15,7 @@ process RIBODETECTOR { tuple val(meta), path("*.nonrna*.fastq.gz"), emit: fastq tuple val(meta), path("*.log") , emit: log tuple val("${task.process}"), val('ribodetector'), eval('ribodetector --version | sed "s/ribodetector //"'), emit: versions_ribodetector, topic: versions + tuple val("${task.process}"), val('cuda'), eval('python -c "import torch; print(torch.version.cuda or \'cpu\')"'), emit: versions_cuda, topic: versions when: task.ext.when == null || task.ext.when diff --git a/modules/nf-core/ribodetector/meta.yml b/modules/nf-core/ribodetector/meta.yml index 76d8f5c8774b..3115fd6ca623 100644 --- a/modules/nf-core/ribodetector/meta.yml +++ b/modules/nf-core/ribodetector/meta.yml @@ -76,6 +76,16 @@ output: - ribodetector --version | sed "s/ribodetector //": type: eval description: The expression to obtain the version of the tool + versions_cuda: + - - ${task.process}: + type: string + description: Name of the process + - cuda: + type: string + description: Name of the runtime + - python -c "import torch; print(torch.version.cuda or 'cpu')": + type: eval + description: CUDA version bundled with the task's pytorch build (reports `cpu` on the non-GPU path) topics: versions: @@ -88,6 +98,15 @@ topics: - ribodetector --version | sed "s/ribodetector //": type: eval description: The expression to obtain the version of the tool + - - ${task.process}: + type: string + description: Name of the process + - cuda: + type: string + description: Name of the runtime + - python -c "import torch; print(torch.version.cuda or 'cpu')": + type: eval + description: CUDA version bundled with the task's pytorch build (reports `cpu` on the non-GPU path) authors: - "@maxibor" From b4da63c000d4a3c1f89e048cc05f75ae6ffd540a Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Wed, 22 Apr 2026 13:24:14 +0100 Subject: [PATCH 3/6] test(ribodetector): add versions_cuda entries to existing CPU snapshot The new versions_cuda topic emit adds an output channel to the process, which breaks snapshot equality for both the real and stub CPU tests. Patch the snap file to include the new entry (`cpu` on the non-GPU path, populated by eval at runtime). GPU snapshot will be regenerated via the nf-core-bot workflow after this lands. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../ribodetector/tests/main.nf.test.snap | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/modules/nf-core/ribodetector/tests/main.nf.test.snap b/modules/nf-core/ribodetector/tests/main.nf.test.snap index cc0a213879a9..325d267b144c 100644 --- a/modules/nf-core/ribodetector/tests/main.nf.test.snap +++ b/modules/nf-core/ribodetector/tests/main.nf.test.snap @@ -8330,6 +8330,13 @@ "ribodetector", "0.3.3" ] + ], + "versions_cuda": [ + [ + "RIBODETECTOR", + "cuda", + "cpu" + ] ] } ], @@ -8370,6 +8377,13 @@ "0.3.3" ] ], + "3": [ + [ + "RIBODETECTOR", + "cuda", + "cpu" + ] + ], "fastq": [ [ { @@ -8397,6 +8411,13 @@ "ribodetector", "0.3.3" ] + ], + "versions_cuda": [ + [ + "RIBODETECTOR", + "cuda", + "cpu" + ] ] } ], From 5290440ca35bd258252a1c440cb631849f512045 Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Wed, 22 Apr 2026 13:38:26 +0100 Subject: [PATCH 4/6] test(ribodetector): fix versions_cuda key order in CPU snapshot nf-test serialises object keys alphabetically; `versions_cuda` comes before `versions_ribodetector` (c < r) in the actual snapshot output. My previous edit had the reverse order which didn't match. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../ribodetector/tests/main.nf.test.snap | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/modules/nf-core/ribodetector/tests/main.nf.test.snap b/modules/nf-core/ribodetector/tests/main.nf.test.snap index 325d267b144c..77f5f4f75280 100644 --- a/modules/nf-core/ribodetector/tests/main.nf.test.snap +++ b/modules/nf-core/ribodetector/tests/main.nf.test.snap @@ -8324,18 +8324,18 @@ "SRR5665260.1.998901/2" ], { - "versions_ribodetector": [ + "versions_cuda": [ [ "RIBODETECTOR", - "ribodetector", - "0.3.3" + "cuda", + "cpu" ] ], - "versions_cuda": [ + "versions_ribodetector": [ [ "RIBODETECTOR", - "cuda", - "cpu" + "ribodetector", + "0.3.3" ] ] } @@ -8405,18 +8405,18 @@ "test.log:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], - "versions_ribodetector": [ + "versions_cuda": [ [ "RIBODETECTOR", - "ribodetector", - "0.3.3" + "cuda", + "cpu" ] ], - "versions_cuda": [ + "versions_ribodetector": [ [ "RIBODETECTOR", - "cuda", - "cpu" + "ribodetector", + "0.3.3" ] ] } From b822b6531f4b3a3bbb7548a0ebc7e31ca8c794ef Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Wed, 22 Apr 2026 13:16:06 +0000 Subject: [PATCH 5/6] [automated] Update gpu snapshot --- .../ribodetector/tests/main.gpu.nf.test.snap | 31 ++++++++++++++++--- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/modules/nf-core/ribodetector/tests/main.gpu.nf.test.snap b/modules/nf-core/ribodetector/tests/main.gpu.nf.test.snap index 89a71d3145c8..46c79b54c48a 100644 --- a/modules/nf-core/ribodetector/tests/main.gpu.nf.test.snap +++ b/modules/nf-core/ribodetector/tests/main.gpu.nf.test.snap @@ -8324,6 +8324,13 @@ "SRR5665260.1.998901/2" ], { + "versions_cuda": [ + [ + "RIBODETECTOR", + "cuda", + "11.2" + ] + ], "versions_ribodetector": [ [ "RIBODETECTOR", @@ -8333,10 +8340,10 @@ ] } ], - "timestamp": "2026-04-14T11:11:46.109723883", + "timestamp": "2026-04-22T13:15:51.198102608", "meta": { "nf-test": "0.9.5", - "nextflow": "25.10.4" + "nextflow": "25.10.2" } }, "ribodetector - GPU stub rnaseq PE input": { @@ -8370,6 +8377,13 @@ "0.3.3" ] ], + "3": [ + [ + "RIBODETECTOR", + "cuda", + "11.2" + ] + ], "fastq": [ [ { @@ -8391,6 +8405,13 @@ "test.log:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], + "versions_cuda": [ + [ + "RIBODETECTOR", + "cuda", + "11.2" + ] + ], "versions_ribodetector": [ [ "RIBODETECTOR", @@ -8400,10 +8421,10 @@ ] } ], - "timestamp": "2026-04-14T11:11:53.692394926", + "timestamp": "2026-04-22T13:16:06.36963835", "meta": { "nf-test": "0.9.5", - "nextflow": "25.10.4" + "nextflow": "25.10.2" } } -} +} \ No newline at end of file From eb16c2fd29661b892bef22ebe1a6a87b8fe5dc85 Mon Sep 17 00:00:00 2001 From: Jonathan Manning Date: Wed, 22 Apr 2026 14:46:08 +0100 Subject: [PATCH 6/6] fix(ribodetector): use descriptive cuda fallback string on non-GPU path Per mashehu: 'cpu' is not a version string, making it misleading inside versions topic channels. Switch the eval fallback to 'no CUDA available', which is unambiguous about what the task's pytorch build actually supports. GPU path is unaffected (the eval's `or` only fires when torch.version.cuda is None). Co-Authored-By: Claude Opus 4.7 (1M context) --- modules/nf-core/ribodetector/main.nf | 2 +- modules/nf-core/ribodetector/meta.yml | 8 ++++---- modules/nf-core/ribodetector/tests/main.nf.test.snap | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/nf-core/ribodetector/main.nf b/modules/nf-core/ribodetector/main.nf index bd7ed14150d0..880247c185b8 100644 --- a/modules/nf-core/ribodetector/main.nf +++ b/modules/nf-core/ribodetector/main.nf @@ -15,7 +15,7 @@ process RIBODETECTOR { tuple val(meta), path("*.nonrna*.fastq.gz"), emit: fastq tuple val(meta), path("*.log") , emit: log tuple val("${task.process}"), val('ribodetector'), eval('ribodetector --version | sed "s/ribodetector //"'), emit: versions_ribodetector, topic: versions - tuple val("${task.process}"), val('cuda'), eval('python -c "import torch; print(torch.version.cuda or \'cpu\')"'), emit: versions_cuda, topic: versions + tuple val("${task.process}"), val('cuda'), eval('python -c "import torch; print(torch.version.cuda or \'no CUDA available\')"'), emit: versions_cuda, topic: versions when: task.ext.when == null || task.ext.when diff --git a/modules/nf-core/ribodetector/meta.yml b/modules/nf-core/ribodetector/meta.yml index 3115fd6ca623..06ec28163578 100644 --- a/modules/nf-core/ribodetector/meta.yml +++ b/modules/nf-core/ribodetector/meta.yml @@ -83,9 +83,9 @@ output: - cuda: type: string description: Name of the runtime - - python -c "import torch; print(torch.version.cuda or 'cpu')": + - python -c "import torch; print(torch.version.cuda or 'no CUDA available')": type: eval - description: CUDA version bundled with the task's pytorch build (reports `cpu` on the non-GPU path) + description: CUDA version bundled with the task's pytorch build, or `no CUDA available` on the non-GPU path topics: versions: @@ -104,9 +104,9 @@ topics: - cuda: type: string description: Name of the runtime - - python -c "import torch; print(torch.version.cuda or 'cpu')": + - python -c "import torch; print(torch.version.cuda or 'no CUDA available')": type: eval - description: CUDA version bundled with the task's pytorch build (reports `cpu` on the non-GPU path) + description: CUDA version bundled with the task's pytorch build, or `no CUDA available` on the non-GPU path authors: - "@maxibor" diff --git a/modules/nf-core/ribodetector/tests/main.nf.test.snap b/modules/nf-core/ribodetector/tests/main.nf.test.snap index 77f5f4f75280..1cefad26360f 100644 --- a/modules/nf-core/ribodetector/tests/main.nf.test.snap +++ b/modules/nf-core/ribodetector/tests/main.nf.test.snap @@ -8328,7 +8328,7 @@ [ "RIBODETECTOR", "cuda", - "cpu" + "no CUDA available" ] ], "versions_ribodetector": [ @@ -8381,7 +8381,7 @@ [ "RIBODETECTOR", "cuda", - "cpu" + "no CUDA available" ] ], "fastq": [ @@ -8409,7 +8409,7 @@ [ "RIBODETECTOR", "cuda", - "cpu" + "no CUDA available" ] ], "versions_ribodetector": [