wave icon indicating copy to clipboard operation
wave copied to clipboard

[Feature] Download Singularity image without having `singularity` installed locally

Open ewels opened this issue 1 year ago โ€ข 12 comments

It would be great to be able to download Singularity / Apptainer images as flat files, without needing to have the tools installed locally.

According to @pditommaso:

it should be doable resolving the url of the tar file uploaded in the oci repo

๐Ÿคž๐Ÿป

ewels avatar Apr 08 '24 07:04 ewels

Ta da!

ยป wave -i oras://docker.io/pditommaso/wave-test:bamtools-2.5.2--5027ffe85d788a97 --inspect -o yaml
container:
  config:
    architecture: null
    config:
      attachStderr: null
      attachStdin: null
      attachStdout: null
      cmd: &id001 []
      domainName: null
      entrypoint: *id001
      env: *id001
      hostName: null
      image: null
      tty: null
      user: null
      workingDir: null
    container: null
    created: null
    rootfs:
      diff_ids: *id001
      type: null
  digest: sha256:c1540f55fa91f1070ca442ebc56c156e1f60b18faf09b0f3c3df4518be206f7d
  hostName: https://registry-1.docker.io
  imageName: pditommaso/wave-test
  manifest:
    annotations: null
    config:
      annotations: null
      digest: sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a
      mediaType: application/vnd.unknown.config.v1+json
      size: 2
    layers:
    - annotations:
        org.opencontainers.image.title: image.sif
      digest: sha256:3b1bcd5a2806a49b1150f408853513ee33bda417804c9e26ac348d566ab1d8b8
      mediaType: application/vnd.sylabs.sif.layer.v1.sif
      size: 44986368
      uri: https://registry-1.docker.io/v2/pditommaso/wave-test/blobs/sha256:3b1bcd5a2806a49b1150f408853513ee33bda417804c9e26ac348d566ab1d8b8
    mediaType: null
    schemaVersion: 2
  reference: bamtools-2.5.2--5027ffe85d788a97
  registry: docker.io

pditommaso avatar Apr 08 '24 08:04 pditommaso

Look at layer URI field ๐Ÿ˜„

pditommaso avatar Apr 08 '24 08:04 pditommaso

Awesome! I tried it on your test, but it failed with a slightly odd response - I assume that this is just a permissions erorr of some kind?

$ wave -i oras://docker.io/pditommaso/wave-test:bamtools-2.5.2--5027ffe85d788a97 --inspect -o yaml
Wave invalid response: [500] {"message":"Unexpected media type for request 'pditommaso/wave-test:bamtools-2.5.2--5027ffe85d788a97' - offending value: null - Error ID: 22c684dff6ee"}

ewels avatar Apr 08 '24 11:04 ewels

it's not yet released ๐Ÿ˜„

pditommaso avatar Apr 08 '24 14:04 pditommaso

As pointed out in meeting, could be serviced as inspect API from Wave

marcodelapierre avatar Apr 09 '24 08:04 marcodelapierre

https://github.com/seqeralabs/wave/issues/446

munishchouhan avatar Apr 09 '24 08:04 munishchouhan

@ewels, as Munish pointed out in #446 we already have an inspect endpoint, /v1alpha1/inspect, it just needs documentation

marcodelapierre avatar Apr 10 '24 04:04 marcodelapierre

Think here the goal is to provide a specialised endpoint to download the tar without having to parse the inspect output

pditommaso avatar Apr 10 '24 07:04 pditommaso

thanks for highlighting Paolo

marcodelapierre avatar Apr 10 '24 07:04 marcodelapierre

Think here the goal is to provide a specialised endpoint to download the tar without having to parse the inspect output

ok noted, will implement a new endpoint for url

munishchouhan avatar Apr 10 '24 10:04 munishchouhan

@pditommaso which branch does have this inpect uri?

munishchouhan avatar Apr 12 '24 10:04 munishchouhan

Master

https://github.com/seqeralabs/wave/blob/08f44007f58ae1aba61978554040116313523f4e/src/main/groovy/io/seqera/wave/controller/InspectController.groovy#L87-L100

We need to clarify how this endpoint is expected to work before starting the implementation

pditommaso avatar Apr 12 '24 10:04 pditommaso