singularityhub / docker2singularity

A docker image for converting docker images to singularity images.
https://quay.io/repository/singularity/docker2singularity?tab=tags
MIT License
282 stars 37 forks source link

Can't pull image on aarch64 #135

Open mattbucci opened 2 weeks ago

mattbucci commented 2 weeks ago

Unable to find image 'quay.io/singularity/docker2singularity:latest' locally latest: Pulling from singularity/docker2singularity docker: no matching manifest for linux/arm64/v8 in the manifest list entries.

I don't see any reason why an image wouldn't be able to be built for aarch64 looking at the Dockerfile, it just seems that the runner isn't set up to build arm images and combine them into a single manifest https://github.com/singularityhub/docker2singularity/blob/008ec30b3c6f86eff06bc9505136e8b0bb16d729/.github/workflows/build-containers.yaml#L13

vsoch commented 2 weeks ago

There never was a build for aarch64. For this conversion you should be pulling down directly anyway:

singularity pull docker://<uri>
mattbucci commented 2 weeks ago

Thanks for clarifying.

I was looking to accomplish something like this https://sylabs.io/2023/12/building-arm-containers-with-scs/ (not for any good reason, just futureproofing as i'm publishing all my images in x86 and arm variants these days)

my actual command is something more like what's found in the readme.

docker run -v /var/run/docker.sock:/var/run/docker.sock \
-v /tmp/test:/output \
--privileged -t --rm \
quay.io/singularity/docker2singularity \
ubuntu:22.04

where ubuntu:22.04 is a stand in for my private image. This runs fine on an an x86 host, but dies on an an arm device with the output listed as like you mentioned this isn't available for aarch64 at this time.

mattbucci commented 2 weeks ago

Thanks for the tip, this worked great:

singularity pull docker://ubuntu:22.04
INFO:    Converting OCI blobs to SIF format
INFO:    Starting build...
Getting image source signatures
Copying blob 6414378b6477 done   |
Copying config 97271d29cb done   |
Writing manifest to image destination
2024/11/04 20:23:47  info unpack layer: sha256:6414378b647780fee8fd903ddb9541d134a1947ce092d08bdeb23a54cb3684ac
INFO:    Creating SIF file...
 ubuntu_22.04.sif
vsoch commented 2 weeks ago

Sure thing! We can try adding the arm build, but they tend to be very slow on GHA, and using singularity directly is the preferred solution I think.