Skip to content

Conversation

@rgarcia
Copy link
Contributor

@rgarcia rgarcia commented Apr 24, 2025

Headless chromium image!

Main features:

  • Runnable as a docker image (./{build,run}-docker.sh) for local testing
  • Unikernel build (./{build,run}-unikernel.sh) uses erofs for max resource efficiency (erofs == memory on demand, cpio == first allocate all in memory, then use)
  • some test scripts:
    • cdp-test: python script that you can feed the url of the docker image or the unikernel instance and it will figure out hte debugger URL and run a basic test
    • uk-check-stats.sh: polls the unikraft API for memory, CPU, and network usage data for an instance. Useful for figuring out what the memory allocation should be

@rgarcia rgarcia requested a review from juecd April 24, 2025 20:23
@rgarcia rgarcia force-pushed the chromium-headless branch from 5974328 to 3ad96fc Compare April 24, 2025 20:25
@juecd juecd requested a review from mertcelebi April 28, 2025 04:14
@rgarcia rgarcia force-pushed the chromium-headless branch from 3ad96fc to 1326adf Compare June 19, 2025 20:07
@rgarcia rgarcia requested a review from Sayan- July 1, 2025 15:52
Comment on lines +58 to +63
docker build --platform linux/amd64 -t "$IMAGE" .
docker rm cnt-"$app_name" || true
docker create --platform linux/amd64 --name cnt-"$app_name" "$IMAGE" /bin/sh
docker cp cnt-"$app_name":/ ./.rootfs
rm -f initrd || true
mkfs.erofs --all-root -d2 -E noinline_data -b 4096 initrd ./.rootfs
Copy link
Contributor

Choose a reason for hiding this comment

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

just to confirm: this difference from the headful image is due to requirements for erofs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah this is how the final filesystem for the vm is constructed. In the headful image we use kraft's built in support for Dockerfiles but that doesn't use erofs. So here we use the Dockerfile "by hand" and construct the root fs for the VM, and then reference that folder in the Kraftfile

@rgarcia rgarcia merged commit 6c169dc into main Jul 1, 2025
1 check passed
@rgarcia rgarcia deleted the chromium-headless branch July 1, 2025 18:38
@mesa-dot-dev mesa-dot-dev bot mentioned this pull request Oct 22, 2025
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.

5 participants