-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add scheme to Docker URIs #9
Comments
Yes, the current definition doesn't make sense. I didn't realize that when reviewing. A link href should be a valid resolvable URL and nothing else. Looking at the example, the following should probably be changed: {
"rel": "ml-model:inferencing-image",
"href": "registry.hub.docker.com/my-user/my-inferencing-model:v1",
"type": "docker-image",
"title": "My Model (v1)"
} to for example: {
"rel": "ml-model:inferencing-image",
"href": "https://registry.hub.docker.com/my-user/my-inferencing-model",
"docker:name": "registry.hub.docker.com/my-user/my-inferencing-model:v1",
"type": "docker-image",
"title": "My Model (v1)"
} or: {
"rel": "ml-model:inferencing-image",
"href": "https://registry.hub.docker.com/my-user/my-inferencing-model",
"docker:registry": "registry.hub.docker.com",
"docker:image": "my-user/my-inferencing-model",
"docker:tag": "v1",
"type": "docker-image",
"title": "My Model (v1)"
} or is there anything that can be used as absolute URL instead? Is Eventually, we could also extract all this into a docker link extension, I guess. |
@m-mohr |
Not that I'm aware of. |
The current definition of the
ml-model:inferencing-image
andml-model:training-image
links requires that they be of the form<registry_domain>/<user_or_organization_name>/<image_name>:<tag>
(e.g.docker.io/some_organization/example-image:1
), which gives the appearance of a relative URI. This causes problems in STAC API implementations likestac-fastapi
that replace relative URLs with absolute URLs prefixed with the API's root path (e.g. the above example in an API with a root ofhttps://some-api.com/stac
would becomehttps://some-api.com/stac/docker.io/some_organization/example-image:1
in any Items containing that link).We should consider redefining that Link type to avoid this issue. We could require that the URI be prefixed with a scheme like
docker://
, but we may also want to reconsider how that link is defined. Most STAC links seem to be defined as HTTP links, so it might be more appropriate to link to the homepage for an image (e.g.https://hub.docker.com/layers/radiantearth/cyclone-model-torchgeo/1/images/sha256-bf09b7cc7e088c0089c0833a4cca0b1f5b4b21a18360ad98e21325ae87c0065a?context=repo
instead ofdocker.io/radiantearth/cyclone-model-torchgeo:1
).cc: @guidorice @m-mohr
The text was updated successfully, but these errors were encountered: