Skip to content
This repository was archived by the owner on Oct 7, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,27 @@ docker run --platform linux/arm64 $container sh -c 'fastp --version'
#### Build a multi-architecture Conda package container (amd64 and arm64)

Pass both platforms separated by a comma to build a single multi-architecture image
backed by an index manifest. Note: multi-platform builds are not supported for Singularity.
backed by an index manifest.

```bash
container=$(wave --conda-package fastp --platform linux/amd64,linux/arm64)
docker run $container sh -c 'fastp --version'
```

#### Build a multi-architecture Singularity container (amd64 and arm64)

The same applies to Singularity: a per-architecture SIF image is built for each platform and
published under a single `oras://` URL backed by an OCI image index. Freeze mode is required
for Singularity builds, and a build repository is typically required as well.

```bash
container=$(wave --conda-package fastp --singularity --freeze --build-repo <YOUR REGISTRY> --platform linux/amd64,linux/arm64)
apptainer pull --arch arm64 $container
```

Note: Apptainer resolves the architecture at pull time, whereas SingularityCE does not yet
support platform selection for `oras://` references (see [sylabs/singularity#4339](https://github.com/sylabs/singularity/pull/4339)).

#### Build a Singularity container using a Conda package and pushing to a OCI registry

```bash
Expand Down
3 changes: 0 additions & 3 deletions app/src/main/java/io/seqera/wave/cli/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,6 @@ protected void validateArgs() {
}
}

if( isMultiPlatform() && singularity )
throw new IllegalCliArgumentException("Multi-platform builds are not supported for Singularity format");

if( isMultiPlatform() && mirror )
throw new IllegalCliArgumentException("Multi-platform builds and --mirror conflict each other");

Expand Down
11 changes: 7 additions & 4 deletions app/src/test/groovy/io/seqera/wave/cli/AppTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -643,18 +643,21 @@ class AppTest extends Specification {
app.@platform == "linux/amd64,linux/arm64"
}

def 'should fail when specifying multi-platform and singularity' () {
def 'should allow multi-platform with singularity' () {
given:
def app = new App()
String[] args = ["--platform", "linux/amd64,linux/arm64", "--singularity", "--freeze", "-f", "Dockerfile"]
String[] args = ["--platform", "linux/amd64,linux/arm64", "--singularity", "--freeze", "-f", "Dockerfile", "--build-repo", "docker.io/foo", "--tower-token", "xyz"]

when:
new CommandLine(app).parseArgs(args)
app.validateArgs()

then:
def e = thrown(IllegalCliArgumentException)
e.getMessage() == "Multi-platform builds are not supported for Singularity format"
noExceptionThrown()
and:
app.@platform == "linux/amd64,linux/arm64"
app.@singularity
app.@freeze
}

def 'should fail when specifying multi-platform and mirror' () {
Expand Down