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] open-sourcing custom CLI push tool #84

Open
yurhasko opened this issue Dec 31, 2024 · 1 comment
Open

[feature] open-sourcing custom CLI push tool #84

yurhasko opened this issue Dec 31, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@yurhasko
Copy link

yurhasko commented Dec 31, 2024

While reading https://blog.cloudflare.com/container-platform-preview/, noticed the following:

"In order to build, chunk, and push these images to the R2 registry, we built a custom CLI tool that we use internally in lieu of running docker build and docker push. This makes it easy to use zstd and split layers into 500 MB chunks, which allows uploads to be processed by Workers while staying under body size limits.

Using our custom build and push tool doubled the speed of image pulls. Our 30 GB GPU images now pull in 4 minutes instead of 8. We plan on open sourcing this tool in the near future."

Is this https://github.com/cloudflare/serverless-registry/tree/main/push the implementation mentioned in the blog post above? Curious because blog post mentions that internal tool "makes easy to use zstd", while in https://github.com/cloudflare/serverless-registry/blob/main/push/README.md it's mentioned among Improvements: Use zstd instead.

Also, https://github.com/cloudflare/serverless-registry/tree/main/push was initially added on the Sep 26 2024, while blog post that mentions "Using our custom build and push tool doubled the speed of image pulls. Our 30 GB GPU images now pull in 4 minutes instead of 8. We plan on open sourcing this tool in the near future.". So I assume that the production-grade tool, that uses zstd, isn't open-sourced yet?

This tool, if open-sourced, would turn Serverless Registry into a real production-grade thing. Also, would be really nice to have an option to split layers into even smaller chunks - 200 MB (for Business plan limit) and 100 MB (for Pro and Free plans).

@gabivlj gabivlj added the enhancement New feature or request label Jan 2, 2025
@Dramelac
Copy link
Contributor

Dramelac commented Jan 2, 2025

Also, would be really nice to have an option to split layers into even smaller chunks - 200 MB (for Business plan limit) and 100 MB (for Pro and Free plans).

From what I've seen in the code, the "current" push tool already dynamically manages chunk size:

const maxChunkLength = +(createUploadResponse.headers.get("oci-chunk-max-length") ?? 100 * 1024 * 1024);

I also think that the tool mentioned in the article is different from the push too present in this repo, I hope it will be available soon.

@gabivlj gabivlj self-assigned this Jan 6, 2025
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

No branches or pull requests

3 participants