-
Notifications
You must be signed in to change notification settings - Fork 86
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
no-conversion without imagemounter #306
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
nit: could you rebase the commit on the latest main to pass CI.
Dockerfile
Outdated
RUN apt-get update -y && apt-get install -y mkisofs | ||
RUN apt-get update -y && apt-get install -y squashfs-tools |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Squashfs comes with some overhead, right?. Can we default to isofs and enable squashfs only for d2oci usage?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. It adds a bit of overhead but cut's the size of the image by about half. I'll add a built option
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added iso back. Added erofs (faster as it aligns data).
package main | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we implement this to c2w and enable this using a flag like --to-squashfs
?
|
||
} else { | ||
if info.bundle != "" { | ||
if info.bundle[0] != '/' { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use filepath.IsAbs https://pkg.go.dev/path/filepath#IsAbs ?
|
||
# Run the Container | ||
```console | ||
wazero run --mount /tmp/riscv-python:/ext/bundle riscv64-squash.wasm python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add docs about /ext/bundle
? Or, this path should be configurable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's configurable. I'll add clarifications to readme.
Please fix linter errors as well.
|
Using
imagemounter
, which works great for browsers, comes with some unnecessary overhead. This is an alternative solution that bypasses the network and uses the built-in WASI capability to map folders. WASI filesystem does not have permissions. To overcome this, we export the container rootfs as a SquashFS image.Goal:
wazero run --mount /tmp/riscv-python:/ext/bundle riscv64-squash.wasm python
Or,
wazero run --mount /tmp/riscv-python:/some/folder riscv64-squash.wasm --external-bundle /some/folder python