Skip to content

Add support to Apple container in tools - #4444

Open
mribeirodantas wants to merge 17 commits into
devfrom
support2appleContainer
Open

Add support to Apple container in tools#4444
mribeirodantas wants to merge 17 commits into
devfrom
support2appleContainer

Conversation

@mribeirodantas

@mribeirodantas mribeirodantas commented Aug 16, 2026

Copy link
Copy Markdown
Member

This PR adds first-class support for Apple container as a container runtime alongside Docker, Singularity, Conda, etc. Apple container runs OCI images natively on Apple Silicon without Docker Desktop.
What's included

  • New appleContainer profile in the pipeline template. By default it emulates amd64 images (like Docker does), so the large majority of existing nf-core modules, which only ship amd64 builds, work out of the box. An optional apple_rosetta param switches emulation to the faster Rosetta path (compared to QEMU).
  • New self-contained appleContainerWave profile for provisioning native arm64 images from conda packages on demand via Wave. This is opt-in and only works for tools with an arm64/linux-aarch64 build available; the limitation is documented in the template features.
  • nf-core pipelines download support for Apple container, including image pulling and a appleContainer-load.sh load script.
  • --profile appleContainer / appleContainerWave now available in nf-core modules/subworkflows test (CLI flag and interactive prompt).
  • Docs and schema: usage docs, README, nextflow_schema.json, and template feature descriptions updated.
    Tests & CI
  • New test suite for the Apple container download path (test_apple_container.py) plus additions to test_download.py.
  • New nf-test snapshot and mock-container fixtures; updated Textual create-app snapshots.
  • Mock pipeline fixture kept off the live Wave API so container discovery via nextflow inspect stays hermetic.
  • Pinned the Nextflow version in the CodSpeed workflow and fixed a GitHub Actions linting error.

PR checklist

  • This comment contains a description of changes (with reason)
  • CHANGELOG.md is updated
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

Closes #4456

mashehu and others added 4 commits July 29, 2026 16:04
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: mashehu <mashehu3@gmail.com>
Co-authored-by: nf-core-bot <core@nf-co.re>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: JulianFlesch <julianflesch@googlemail.com>
Co-authored-by: Matthieu Muffato <mm49@sanger.ac.uk>
Co-authored-by: yuxinNing <ningyuxin1999@126.com>
Co-authored-by: yuxinNing <92061677+ningyuxin1999@users.noreply.github.com>
Co-authored-by: JosuaCarl-Agents <josua.carl@web.de>
Co-authored-by: CodSpeed Bot <no-reply@codspeed.io>
Co-authored-by: louis <louislenezet@gmail.com>
Co-authored-by: Louis Le Nézet <58640615+LouisLeNezet@users.noreply.github.com>
Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com>
Co-authored-by: Jonathan Manning <jonathan.manning@seqera.io>
Co-authored-by: Beatriz Vinhas <beatriz.sa.vinhas@gmail.com>
Co-authored-by: Nicolas Vannieuwkerke <nicolas.vannieuwkerke@ugent.be>
Co-authored-by: Alexander Peltzer <apeltzer@users.noreply.github.com>
Co-authored-by: Adrien Coulier <adrien.coulier@pixelgen.com>
Co-authored-by: Phil Ewels <phil.ewels@seqera.io>
Co-authored-by: Maxime U Garcia <max.u.garcia@gmail.com>
Co-authored-by: simojoe <37026683+simojoe@users.noreply.github.com>
Co-authored-by: Joël Simoneau <simoneaujoel@gmail.com>
Co-authored-by: Vincent Gao <gaobing1230@gmail.com>
Co-authored-by: James A. Fellows Yates <jfy133@gmail.com>
Co-authored-by: JulianFlesch <julian.flesch@qbic.uni-tuebingen.de>
Co-authored-by: znorgaard <zach@fulcrumgenomics.com>
Co-authored-by: Josua Carl <53010862+JosuaCarl@users.noreply.github.com>
Co-authored-by: sanmaxdev <sanmaxdev@users.noreply.github.com>
Co-authored-by: Sangeeth Thilakarathna <46221775+sanmaxdev@users.noreply.github.com>
Co-authored-by: codspeed-hq[bot] <117304815+codspeed-hq[bot]@users.noreply.github.com>
Co-authored-by: Damon-Lee Pointon <51855558+DLBPointon@users.noreply.github.com>
Co-authored-by: Matthias Zepper <6963520+MatthiasZepper@users.noreply.github.com>
- Add template_features.yml toggle for Apple Container in the template
features
- Add integration tests
@mribeirodantas mribeirodantas self-assigned this Aug 16, 2026
@codecov

codecov Bot commented Aug 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 52.83019% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.12%. Comparing base (cb623e0) to head (21abd60).

Files with missing lines Patch % Lines
nf_core/pipelines/download/apple_container.py 54.54% 20 Missing ⚠️
nf_core/components/components_test.py 0.00% 3 Missing ⚠️
nf_core/pipelines/download/download.py 60.00% 2 Missing ⚠️

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mribeirodantas
mribeirodantas changed the base branch from main to dev August 20, 2026 01:41
Apple Container runs containers only natively on Apple Silicon (arm64) with
no Rosetta/QEMU emulation, so it cannot run amd64 biocontainer images. Without
an arm64 image source the appleContainer profile stalls trying to use
incompatible images.

Wire the appleContainer profile to build native arm64 images on demand via
Wave from the module's conda packages:

  process.arch  = 'arm64'
  wave.enabled  = true
  wave.freeze   = true
  wave.strategy = 'conda,container'

Applied consistently to:
  - nf_core/pipeline-template/nextflow.config           (generated pipelines)
  - tests/data/mock_pipeline_containers/nextflow.config (test fixture parity)
  - template_features.yml                                (documents behavior)

Verified: nf-test on the seqkit/stats module with --profile appleContainer
builds a native arm64 image via Wave and passes all tests.

Document the limitations in template_features.yml:
- Only tools with an arm64 build (conda linux-aarch64 package or multi-arch
  container image) can be provisioned. amd64-only tools such as
  prinseq-plus-plus and fastqc cannot run under Apple Container; use the
  docker profile with amd64 emulation for those.
- The profile works without a Seqera token, but wave.freeze pushes anonymous
  frozen images to the community registry where they expire (causing
  occasional rebuilds). Setting TOWER_ACCESS_TOKEN is recommended so frozen
  images are durable and reproducible, after which runs simply pull the
  cached arm64 image.
@mribeirodantas

mribeirodantas commented Aug 21, 2026

Copy link
Copy Markdown
Member Author

What's missing for this feature:

 appleContainer {
        appleContainer.enabled  = true
        docker.enabled          = false
        singularity.enabled     = false
        conda.enabled           = false
        // amd64 Biocontainers run under Apple Container emulation on arm64.                                                                                                
        process.arch            = 'linux/amd64'
        // appleContainer.runOptions   = '--rosetta'
      }

in modules/tests/config/nf-test.config (nf-core/modules repo) so that we can run e.g. nf-core modules test seqkit/stats --update --profile appleContainer

@mribeirodantas
mribeirodantas marked this pull request as ready for review August 21, 2026 03:36
…ntainer profile

The test_containers_pipeline_apple_container test drives `nextflow inspect`
under `-profile appleContainer,test,test_full` to verify container discovery.
The fixture's appleContainer profile mirrored the production template and
enabled Wave freeze (wave.enabled + wave.freeze + wave.strategy =
'conda,container', process.arch = 'arm64').

This made `nextflow inspect` call the live Wave API for every container in the
mock pipeline, which cannot work in CI:

  - Freeze mode without a build repository is rejected outright:
    POST /v1alpha2/container [400] "Attribute `buildRepository` must be
    specified when using freeze mode".
  - Even with a build repository, the mock's `container` directives (e.g.
    quay.io/biocontainers/singlequay:1.9--pyh9f0ad1d_0) are pushed through
    Wave and fail on registry auth:
    POST /v1alpha2/container [401] "repository '...' unauthorized".

Either way `nextflow inspect` dies on the Wave call before reaching the
strict-syntax DownloadError the test asserts on, and the test depends on live
Wave + registry auth, making it fragile.

Container discovery via `nextflow inspect` does not need Wave: the fixture only
needs the container system enabled so declared images resolve. This drops all
wave.* settings from the fixture's appleContainer profile so it behaves like
the sibling docker/apptainer/singularity profiles (none of which enable Wave).

The production template profile (nf_core/pipeline-template/nextflow.config) is
intentionally left unchanged; Wave freeze there is a runtime concern for real
arm64 pipelines, not something this discovery test should exercise.
Co-authored-by: mribeirodantas <1023197+mribeirodantas@users.noreply.github.com>
@codspeed-hq

codspeed-hq Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Hooray! CodSpeed harness just leveled up!

The base and head of this comparison were measured with different runner settings, so their benchmark values are not directly comparable.

What changed between base and head:

  • CodSpeed runner v5 changed how benchmarks are measured (base 4.18.4 → head 5.0.1). View release notes

Re-run the base with the same settings to get a valid performance comparison.


Comparing support2appleContainer (21abd60) with dev (cb0ac11)1

Open in CodSpeed

Footnotes

  1. No successful run was found on dev (cb623e0) during the generation of this report, so cb0ac11 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@mashehu

mashehu commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

do you have a working test of this setup in a pipeline?

@mribeirodantas

mribeirodantas commented Aug 21, 2026

Copy link
Copy Markdown
Member Author

do you have a working test of this setup in a pipeline?

Go to your clone of the modules repo and add the appleContainer profile to the tests/config/nf-test.config file:

appleContainer {
    appleContainer.enabled  = true
    docker.enabled          = false
    singularity.enabled     = false
    conda.enabled           = false
    // amd64 Biocontainers run under Apple Container emulation on arm64.
    process.arch            = 'linux/amd64'
    // Comment below if you do not have Rosetta installed
    appleContainer.runOptions   = '--rosetta'
}

Install the PR version of nf-core/tools (I did it with pip install -e .) and run:

nf-core modules test seqkit/seq --once --update --profile appleContainer

You should see:

$ nf-core modules test seqtk/seq --once --update --profile appleContainer


                                          ,--./,-.
          ___     __   __   __   ___     /,-._.--~\ 
    |\ | |__  __ /  ` /  \ |__) |__         }  {
    | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                          `._,._,'

    nf-core/tools version 4.1.0 - https://nf-co.re


INFO     Generating nf-test snapshot
Displaying nf-test output
╭──────────────────────────────────────────────────────────────────────────── nf-test output ─────────────────────────────────────────────────────────────────────────────╮
│                                                                                                                                                                         │
│ 🚀 nf-test 0.9.5                                                                                                                                                        │
│ https://www.nf-test.com                                                                                                                                                 │
│ Please cite: https://doi.org/10.1093/gigascience/giaf130                                                                                                                │
│ (c) 2021 - 2026 Lukas Forer and Sebastian Schoenherr                                                                                                                    │
│                                                                                                                                                                         │
│ Load .nf-test/plugins/nft-anndata/0.4.1/nft-anndata-0.4.1.jar                                                                                                           │
│ Load .nf-test/plugins/nft-bam/0.7.0/nft-bam-0.7.0.jar                                                                                                                   │
│ Load .nf-test/plugins/nft-csv/0.1.0/nft-csv-0.1.0.jar                                                                                                                   │
│ Load .nf-test/plugins/nft-compress/0.1.0/nft-compress-0.1.0.jar                                                                                                         │
│ Load .nf-test/plugins/nft-fastq/0.1.0/nft-fastq-0.1.0.jar                                                                                                               │
│ Load .nf-test/plugins/nft-utils/1.1.1/nft-utils-1.1.1.jar                                                                                                               │
│ Load .nf-test/plugins/nft-vcf/1.0.7/nft-vcf-1.0.7.jar                                                                                                                   │
│ Warning: every snapshot that fails during this test run is re-recorded.                                                                                                 │
│                                                                                                                                                                         │
│ Test Process BLAT                                                                                                                                                       │
│                                                                                                                                                                         │
│   Test [7f3ac0b2] 'test-blat' PASSED (9.861s)                                                                                                                           │
│   Test [9c715038] 'test-blat-stub' PASSED (9.161s)                                                                                                                      │
│                                                                                                                                                                         │
│ Test Process SEQTK_SEQ                                                                                                                                                  │
│                                                                                                                                                                         │
│   Test [46d6b3ba] 'sarscov2_seq_fa' PASSED (7.046s)                                                                                                                     │
│   Test [27844f9d] 'sarscov2_seq_fq' PASSED (7.497s)                                                                                                                     │
│   Test [283a076c] 'sarscov2_seq_fa_stub' PASSED (8.454s)                                                                                                                │
│                                                                                                                                                                         │
│                                                                                                                                                                         │
│ SUCCESS: Executed 5 tests in 42.057s                                                                                                                                    │
│                                                                                                                                                                         │
│                                                                                                                                                                         │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Displaying nf-test error 
CRITICAL Ran, but found errors:                                                                                                                                            
          - nf-test failed                                                    

PS: You need to be on macOS and have container installed/running. You can test the installation with container system status, e.g.:

$ container system status
FIELD              VALUE
status             running
appRoot            /Users/mribeirodantas/Library/Application Support/com.apple.container/
installRoot        /usr/local/
logRoot            
apiserver.version  container-apiserver version 1.2.2 (build: release, commit: 0190097)
apiserver.commit   0190097d06df0b9065f4c2d2c7873c649d81d493
apiserver.build    release
apiserver.appName  container-apiserver

If you want to try native arm64 containers, you can use the Wave profile below, like you added the appleContainer (at the beginning of this message):

appleContainerWave {
        // Self-contained Apple Container + Wave profile: provision native arm64
        // images from conda via Wave instead of emulating amd64. Usable on its 
        // own (`-profile appleContainerWave`, e.g. with
        // `nf-core modules test --profile appleContainer`-style single-profile
        // callers) or composed after appleContainer
        // (`-profile appleContainer,appleContainerWave`). Faster per task when
        // an arm64 build exists, but only works for tools with an arm64 (conda
        // linux-aarch64 / multi-arch) build available, and pushes frozen images
        // to a registry (set TOWER_ACCESS_TOKEN for durable, reproducible
        // builds).
        appleContainer.enabled    = true
        conda.enabled             = false
        docker.enabled            = false
        singularity.enabled       = false
        podman.enabled            = false
        shifter.enabled           = false
        charliecloud.enabled      = false
        apptainer.enabled         = false
        process.arch              = 'arm64'
        appleContainer.runOptions = ''
        wave.enabled              = true
        wave.freeze               = true
        wave.strategy             = 'conda,container'
    }

Then

nf-core modules test seqkit/seq --once --profile appleContainerWave

The only issue with this one is that there could be a module tagging this one and the tagging module does not have an arm64 conda package, so the building will fail for this one. That's exactly what happens for this example:

nf-core modules test seqkit/seq --once --profile appleContainerWave


                                          ,--./,-.
          ___     __   __   __   ___     /,-._.--~\ 
    |\ | |__  __ /  ` /  \ |__) |__         }  {
    | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                          `._,._,'

    nf-core/tools version 4.1.0 - https://nf-co.re


INFO     Generating nf-test snapshot                                                                                                                                       
Displaying nf-test output
╭──────────────────────────────────────────────────────────────────────────── nf-test output ─────────────────────────────────────────────────────────────────────────────╮
│                                                                                                                                                                         │
│ 🚀 nf-test 0.9.5                                                                                                                                                        │
│ https://www.nf-test.com                                                                                                                                                 │
│ Please cite: https://doi.org/10.1093/gigascience/giaf130                                                                                                                │
│ (c) 2021 - 2026 Lukas Forer and Sebastian Schoenherr                                                                                                                    │
│                                                                                                                                                                         │
│ Load .nf-test/plugins/nft-anndata/0.4.1/nft-anndata-0.4.1.jar                                                                                                           │
│ Load .nf-test/plugins/nft-bam/0.7.0/nft-bam-0.7.0.jar                                                                                                                   │
│ Load .nf-test/plugins/nft-csv/0.1.0/nft-csv-0.1.0.jar                                                                                                                   │
│ Load .nf-test/plugins/nft-compress/0.1.0/nft-compress-0.1.0.jar                                                                                                         │
│ Load .nf-test/plugins/nft-fastq/0.1.0/nft-fastq-0.1.0.jar                                                                                                               │
│ Load .nf-test/plugins/nft-utils/1.1.1/nft-utils-1.1.1.jar                                                                                                               │
│ Load .nf-test/plugins/nft-vcf/1.0.7/nft-vcf-1.0.7.jar                                                                                                                   │
│                                                                                                                                                                         │
│ Test Process SEQKIT_SEQ                                                                                                                                                 │
│                                                                                                                                                                         │
│   Test [fcc273ff] 'sarscov2-genome_fasta' PASSED (10.491s)                                                                                                              │
│   Test [9726e341] 'sarscov2-genome_fasta_gz' PASSED (8.051s)                                                                                                            │
│   Test [d7c6deda] 'sarscov2-test_1_fastq_gz' PASSED (7.945s)                                                                                                            │
│   Test [15455052] 'file_name_conflict-fail_with_error' PASSED (5.304s)                                                                                                  │
│   Test [4fb8063f] 'sarscov2-genome_fasta-stub' PASSED (7.429s)                                                                                                          │
│   Test [59ffbfbe] 'file_name_conflict-fail_with_error-stub' PASSED (5.333s)                                                                                             │
│                                                                                                                                                                         │
│ Test Subworkflow FAA_SEQFU_SEQKIT                                                                                                                                       │
│                                                                                                                                                                         │
│   Test [b8e52fe7] 'faa' PASSED (14.729s)                                                                                                                                │
│   Test [38c06fbc] 'faa - stub' PASSED (16.008s)                                                                                                                         │
│                                                                                                                                                                         │
│ Test Workflow FASTA_EXPLORE_SEARCH_PLOT_TIDK                                                                                                                            │
│                                                                                                                                                                         │
│   Test [9b496882] 'homo_sapiens-genome_fasta-genome_21_fasta' PASSED (107.646s)                                                                                         │
│   Test [17d92941] 'homo_sapiens-genome_fasta-genome_21_fasta-partial_apriori-stub' PASSED (39.125s)                                                                     │
│   Test [298600d5] 'homo_sapiens-genome_fasta-genome_21_fasta-no_apriori-stub' PASSED (45.117s)                                                                          │
│                                                                                                                                                                         │
│ Test Subworkflow FASTQ_PREPROCESS_SEQKIT                                                                                                                                │
│                                                                                                                                                                         │
│   Test [f376b119] 'sarscov2 - fastq - single_end' PASSED (15.389s)                                                                                                      │
│   Test [265eab98] 'sarscov2 - fastq - paired_end' PASSED (23.085s)                                                                                                      │
│   Test [f72e4121] 'sarscov2 - fastq - both with single broken' PASSED (29.374s)                                                                                         │
│   Test [2063df02] 'sarscov2 - fastq - stub' PASSED (13.768s)                                                                                                            │
│                                                                                                                                                                         │
│ Test Subworkflow FASTQ_SHORTREADS_PREPROCESS_QC                                                                                                                         │
│                                                                                                                                                                         │
│   Test [65df7f1c] 'sarscov2 - fastq - seqfu - seqkit - deacon - single_end' PASSED (25.438s)                                                                            │
│   Test [325167d9] 'sarscov2 - fastq - umitools - prinseq - clumpify - cat - single_end' FAILED (76.837s)                                                                │
│                                                                                                                                                                         │
│   Assertion failed:                                                                                                                                                     │
│                                                                                                                                                                         │
│   assert workflow.success                                                                                                                                               │
│          |        |                                                                                                                                                     │
│          workflow false                                                                                                                                                 │
│                                                                                                                                                                         │
│   Nextflow stdout:                                                                                                                                                      │
│                                                                                                                                                                         │
│   Awaiting container provisioning: community.wave.seqera.io/library/prinseq-plus-plus:1.2.3--15ca1858030089a8                                                           │
│   ERROR ~ Error executing process > 'FASTQ_SHORTREADS_PREPROCESS_QC:FASTQ_COMPLEXITY_FILTER:PRINSEQPLUSPLUS (test)'                                                     │
│                                                                                                                                                                         │
│   Caused by:                                                                                                                                                            │
│     Wave provisioning for container 'community.wave.seqera.io/library/prinseq-plus-plus:1.2.3--15ca1858030089a8' did not complete successfully                          │
│     - Reason: Container build did not complete successfully                                                                                                             │
│     - Find out more here: https://wave.seqera.io/view/builds/bd-15ca1858030089a8_4                                                                                      │
│                                                                                                                                                                         │
│                                                                                                                                                                         │
│   Command executed:                                                                                                                                                     │
│                                                                                                                                                                         │
│     prinseq++ \                                                                                                                                                         │
│         -threads 4 \                                                                                                                                                    │
│         -fastq test.umi_extract.fastq.gz \                                                                                                                              │
│         -out_name test \                                                                                                                                                │
│         -out_gz \                                                                                                                                                       │
│         -VERBOSE 1 \                                                                                                                                                    │
│          \                                                                                                                                                              │
│         | tee test.log                                                                                                                                                  │
│                                                                                                                                                                         │
│   Command exit status:                                                                                                                                                  │
│     -                                                                                                                                                                   │
│                                                                                                                                                                         │
│   Command output:                                                                                                                                                       │
│     (empty)                                                                                                                                                             │
│                                                                                                                                                                         │
│   Work dir:                                                                                                                                                             │
│     /Users/mribeirodantas/dev/work/modules/.nf-test/tests/325167d97e4f0bddc7add2159c3df312/work/c8/396cc4a1af2b70caf562cdfbd170f1                                       │
│                                                                                                                                                                         │
│   Container:                                                                                                                                                            │
│     community.wave.seqera.io/library/prinseq-plus-plus:1.2.3--15ca1858030089a8                                                                                          │
│                                                                                                                                                                         │
│   Tip: view the complete command output by changing to the process work dir and entering the command `cat .command.out`                                                 │
│                                                                                                                                                                         │
│    -- Check '/Users/mribeirodantas/dev/work/modules/.nf-test/tests/325167d97e4f0bddc7add2159c3df312/meta/nextflow.log' file for details                                 │
│   Nextflow stderr:                                                                                                                                                      │
│                                                                                                                                                                         │
│   Nextflow 26.04.6 is available - Please consider updating your version to it                                                                                           │
│                                                                                                                                                                         │
│                                                                                                                                                                         │
│   Test [4af4804c] 'sarscov2 - fastq - fastqc - seqkit - cutadapt - clumpify - cat - paired_end' PASSED (36.867s)                                                        │
│   Test [29a5fed2] 'sarscov2 - fastq - adapterremoval - merge - cat more files - paired_end' PASSED (18.665s)                                                            │
│   Test [725d58d1] 'sarscov2 - fastq - skip all - single_end' PASSED (5.38s)                                                                                             │
│   Test [8b8e728e] 'sarscov2 - fastq - skip all - single_end - stub' PASSED (5.18s)                                                                                      │
│   Snapshots:                                                                                                                                                            │
│     Obsolete snapshots can only be checked if all tests of a file are executed successful.                                                                              │
│                                                                                                                                                                         │
│                                                                                                                                                                         │
│ FAILURE: Executed 21 tests in 517.358s (1 failed)                                                                                                                       │
│                                                                                                                                                                         │
│                                                                                                                                                                         │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Displaying nf-test error 
CRITICAL Ran, but found errors:                                                                                                                                            
          - nf-test failed                                                                                                                                                 
          - Assertion failed.                                                                                                                                              

Apple Container runs on Apple Silicon (arm64) but, like Docker, can run
amd64 images via emulation with `--platform linux/amd64`. The previous
support assumed Apple Container could only run native arm64 and forced
every run through Wave to build arm64 images from conda — slow,
network-dependent, and broken for tools without an arm64 build.

Since most nf-core modules ship amd64 container images, the profile now
emulates amd64 by default and works out of the box with no Wave
dependency. Native arm64 via Wave becomes an explicit opt-in.
- nextflow.config: appleContainer profile now sets
  `process.arch = 'linux/amd64'` and passes `--platform linux/amd64`;
  appends `--rosetta` when the new `--apple_rosetta` param is set. Add a
  composable `appleContainerWave` profile for native arm64 via Wave
  (`-profile appleContainer,appleContainerWave`).
- template_features.yml: add the `apple_rosetta` param (default false,
  gated behind the apple_container feature) and rewrite the help text to
  document emulation, Rosetta, and the Wave opt-in.
- containers_utils.py: add `appleContainer_amd64` alongside
  `appleContainer_arm64` so generated offline container configs match
  both profiles.
- download/apple_container.py: make the pull/save `--platform` value
  configurable via `image_arch`, defaulting to linux/amd64 instead of a
  hardcoded linux/arm64.
- Update mock fixture comment and download tests to expect linux/amd64.
…table profile

Previously appleContainerWave was an opt-in override meant only to be
composed after appleContainer (`-profile appleContainer,appleContainerWave`).
It relied on the base profile to disable the other container engines, so it
could not be used on its own — which broke single-profile callers like
`nf-core modules/subworkflows test --profile ...`.

Make the profile stand alone by explicitly enabling appleContainer and
disabling conda/docker/singularity/podman/shifter/charliecloud/apptainer,
so it works both standalone (`-profile appleContainerWave`) and composed
after appleContainer.

Also expose it through the tooling:
- Add "appleContainerWave" to the --profile choices for
  `modules create` and `subworkflows create`.
- Add "Apple Container (Wave/arm64)" to the interactive test profile
  picker and map it to the appleContainerWave Nextflow profile.
@SPPearce

Copy link
Copy Markdown
Contributor

Um, is this an issue with this PR, or a seperate issue in your copied output @mribeirodantas ?

│ SUCCESS: Executed 5 tests in 42.057s │
Displaying nf-test error
CRITICAL Ran, but found errors:
- nf-test failed

Comment thread nf_core/pipeline-template/nextflow.config Outdated
@pontus

pontus commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

For clarity so that I understand - apple containers also support arm64 containers and if you want to use (for a process that has a configured container that supports arm64), you'd set process.arch = "linux/arm"?

What happens on mismatches/if process.arch is unset?

@mribeirodantas

Copy link
Copy Markdown
Member Author

Um, is this an issue with this PR, or a seperate issue in your copied output @mribeirodantas ?

│ SUCCESS: Executed 5 tests in 42.057s │
Displaying nf-test error
CRITICAL Ran, but found errors:

  • nf-test failed

Unrelated to the PR.

@mribeirodantas

Copy link
Copy Markdown
Member Author

For clarity so that I understand - apple containers also support arm64 containers and if you want to use (for a process that has a configured container that supports arm64), you'd set process.arch = "linux/arm"?
What happens on mismatches/if process.arch is unset?

Apple container runs arm64 container images by default. If the container image that you picked is not arm64 or multi-arch without arm64 included, it will fail. You can read about it here, in the Nextflow docs. That's why in this PR I set process.arch = 'linux/amd64' by default. If the user wants to pick the arm64 version in multi-arch images, or wants to run arm64 images, they can leave the process.arch unset or set it explicitly.

Comment thread nf_core/pipeline-template/nextflow.config Outdated
@mribeirodantas

Copy link
Copy Markdown
Member Author

LGTM?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants