From cd458e9f13f3f38858ac54e880450392a6fab838 Mon Sep 17 00:00:00 2001 From: Maxime U Garcia Date: Fri, 28 Feb 2025 13:38:56 +0100 Subject: [PATCH] Make container image configurable via parameter (#33) docker.io has very limited free tier usage. Therefore this pipeline fails because it is unable to pull images from dockerhub unless credentials are supplied. This PR switches to using quay.io which has much higher limits and is therefore easier to use out of the box. It also switches ubuntu from version 23.10 to 24.04. Closes https://github.com/seqeralabs/nf-canary/issues/32 --------- Co-authored-by: Adam Talbot <12817534+adamrtalbot@users.noreply.github.com> --- README.md | 8 ++++++++ nextflow.config | 3 ++- nextflow_schema.json | 6 ++++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4077ccb..89c8933 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,14 @@ Configure your infrastructure using the appropriate configuration files listed i nf-canary adheres to the `--outdir` convention established by [nf-core](https://nf-co.re/) to determine the output file destination. If not specified, output files are written to the work directory under a subfolder named `outputs`. +### Overriding default container + +The container is specified by the `container` parameter, which defaults to `quay.io/biocontainers/ubuntu:24.04`. If you wish to use a different container, you can specify an alternative using the --container parameter. + +```nextflow +params.container = 'docker.io/ubuntu:24.04' +``` + ### Skipping Tests Skip individual tests by name using the `--skip` parameter, e.g., `--skip TEST_INPUT`. Multiple tests can be specified with comma-delimited values, e.g., `--skip TEST_CREATE_FILE,TEST_PASS_FILE`. The parameter is case-insensitive. diff --git a/nextflow.config b/nextflow.config index e7e4b34..8edb0c6 100644 --- a/nextflow.config +++ b/nextflow.config @@ -4,10 +4,11 @@ params { run = null outdir = null remoteFile = null + container = "quay.io/biocontainers/ubuntu:24.04" } process { - container = "docker.io/library/ubuntu:23.10" + container = params.container errorStrategy = "finish" when = { ( params.run ? params.run.split(',').any{ "NF_CANARY:${it.toUpperCase()}".contains(task.process) } : true ) && diff --git a/nextflow_schema.json b/nextflow_schema.json index 6e969fb..88668a4 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -27,6 +27,12 @@ "help_text": "Path to a remote file to use within the pipeline. This mimics a remote set of files such as reference data that may need to be retrieved prior to analysis. By default this is not specified and the test is not ran, add a remote file using standard Nextflow filenaming to pull a file from your storage (e.g. an S3 bucket or shared storage).", "format": "path" }, + "container": { + "type": "string", + "description": "Container URI for nf-canary", + "help_text": "Specifies the container URI. By default, this is an Ubuntu container on quay.io with no usage limits.", + "default": "quay.io/biocontainers/ubuntu:24.04" + }, "gpu": { "type": "boolean", "description": "Whether to test GPU utilization within a process."