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

Add support for erofs and squashfs layer media types #1191

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rchincha
Copy link

OCI artifacts support has landed in various OCI specs v1.1.0 which allows for arbitrary artifact types, small and large.

Large artifacts (even existing container images) pose a particular challenge that:

  1. it takes too long to download
  2. it takes too long to unpack

This PR begins to address 2. above.

squashfs (an older read-only) and erofs (newer) filesystems are already compressed full filesystems, and overlayfs compatible.

Copy link
Contributor

@sudo-bmitch sudo-bmitch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a rebase on main to be considered. Also, I don't think we need to include non-OCI media types, especially if they've been registered with IANA.

@rchincha
Copy link
Author

#1190

OCI artifacts support has landed in various OCI specs v1.1.0 which
allows for arbitrary artifact types, small and large.

Large artifacts (even existing container images) pose a particular challenge that:
1. it takes too long to download
2. it takes too long to unpack

This PR **begins** to address 2. above.

squashfs (an older read-only) and erofs (newer) filesystems are already
compressed full filesystems, and overlayfs compatible.

The downsides are this change becomes very Linux-specific?

Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
@rchincha
Copy link
Author

opencontainers/distribution-spec#537
to be combined with ^

@rchincha
Copy link
Author

rchincha commented May 29, 2024

This needs a rebase on main to be considered. Also, I don't think we need to include non-OCI media types, especially if they've been registered with IANA.

This PR just represents possibilities. Needs a discussion if OCI wants to "adopt" this a recommended option. Almost all known solutions end up being a clever fuse or remotefs wrapper around a layer - so why not make the layer a filesystem itself! No further machinery needed.

@hsiangkao
Copy link

This needs a rebase on main to be considered. Also, I don't think we need to include non-OCI media types, especially if they've been registered with IANA.

This PR just represents possibilities. Needs a discussion if OCI wants to "adopt" this a recommended option. Almost all known solutions end up being a clever fuse or remotefs wrapper around a layer - so why not make the layer a filesystem itself! No further machinery needed.

JFYI, EROFS already has a IANA-registered media type "vnd.erofs" if some format is referred.

@rchincha
Copy link
Author

Could also be application/vnd.oci.image.layer.erofs and application/vnd.oci.image.layer.squashfs
just so that we indicate this is OCI blessed.

Open question, whiteout handling

@syed
Copy link

syed commented Jun 12, 2024

The problems I see with large binary files (eg AI models) is that they don't tend well to compression. I would like to see if we can improve the distribution spec to allow parallel chunked upload/download. Right now we can only upload/download sequentially

@sudo-bmitch
Copy link
Contributor

Right now we can only upload/download sequentially

I get the impression that most registries allow this already and we're just formalizing it.

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.

4 participants