Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Download Singularity image without having singularity installed locally #443

Open
ewels opened this issue Apr 8, 2024 · 12 comments
Assignees
Labels
enhancement New feature or request

Comments

@ewels
Copy link
Member

ewels commented Apr 8, 2024

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 ewels added the enhancement New feature or request label Apr 8, 2024
@pditommaso
Copy link
Contributor

pditommaso commented Apr 8, 2024

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
Copy link
Contributor

Look at layer URI field 😄

@ewels
Copy link
Member Author

ewels commented Apr 8, 2024

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"}

@pditommaso
Copy link
Contributor

it's not yet released 😄

@marcodelapierre
Copy link
Contributor

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

@munishchouhan
Copy link
Member

#446

@marcodelapierre
Copy link
Contributor

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

@pditommaso
Copy link
Contributor

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

@marcodelapierre
Copy link
Contributor

thanks for highlighting Paolo

@munishchouhan
Copy link
Member

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
Copy link
Member

@pditommaso which branch does have this inpect uri?

@pditommaso
Copy link
Contributor

Master

// anonymous access
if( !req.towerAccessToken ) {
return CompletableFuture.completedFuture(makeResponse(req, PlatformId.NULL))
}
// We first check if the service is registered
final registration = pairingService.getPairingRecord(PairingService.TOWER_SERVICE, req.towerEndpoint)
if( !registration )
throw new BadRequestException("Tower instance '${req.towerEndpoint}' has not enabled to connect Wave service '$serverUrl'")
// find out the user associated with the specified tower access token
return userService
.getUserByAccessTokenAsync(registration.endpoint, req.towerAccessToken)
.thenApplyAsync({ User user -> makeResponse(req, PlatformId.of(user,req)) }, ioExecutor)

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

@munishchouhan munishchouhan linked a pull request Apr 15, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants