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

Preload oras://ghcr.io SIF images for better UX #10

Merged
merged 18 commits into from
Oct 28, 2023
Merged

Conversation

maouw
Copy link
Owner

@maouw maouw commented Oct 28, 2023

Preloads oras://ghcr.io SIF images for better UX -- shows download progress.

This should not be necessary as of Apptainer v1.2.3 (2023-09-14):

The apptainer push/pull commands now show a progress bar for the oras protocol like there was for docker and library protocols.

But klone has apptainer 1.1.5 installed. Ideally, we should be able to remove this when klone upgrades the apptainer version.

The implementation uses curl to query the ghcr API in roughly the same way apptainer does it in internal/pkg/client/oras/oras.go. It uses python3 to parse the JSON responses and downloads the blob for the image directly to $APPTAINER_CACHEDIR/cache/oras, which is where apptainer looks for a cached image from oras://ghcr.io (This apptainer cache behavior might change in the future.).

If anything goes wrong, the preload will fail and hyakvnc will carry on.

@maouw maouw merged commit 483e6fd into main Oct 28, 2023
1 check failed
@maouw maouw deleted the apptainer-pull-cache branch October 28, 2023 03:22
@maouw maouw restored the apptainer-pull-cache branch November 22, 2023 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant