Skip to content

feat: add pyhl container image for device plugin deployments - #109

Merged
danbugs merged 4 commits into
mainfrom
feat/pyhl-container-image
Jul 8, 2026
Merged

feat: add pyhl container image for device plugin deployments#109
danbugs merged 4 commits into
mainfrom
feat/pyhl-container-image

Conversation

@danbugs

@danbugs danbugs commented Jul 8, 2026

Copy link
Copy Markdown
Contributor
  • Adds a Dockerfile and entrypoint that bundle pyhl + the python-agent-driver kernel + initrd into a single runnable container (ghcr.io/hyperlight-dev/hyperlight-unikraft/pyhl:latest)
  • Adds a publish-pyhl job to the GHCR publish workflow, triggered by changes to host/, examples/, runtimes/, or the workflow itself
  • The image is designed for hyperlight-on-kubernetes device plugin deployments — the pod gets /dev/kvm via hyperlight.dev/hypervisor: "1" and pyhl handles VM lifecycle internally
  • Entrypoint supports --setup-only flag for use as a Kubernetes init container, separating warmup from script execution

danbugs added 3 commits July 8, 2026 16:39
Signed-off-by: danbugs <danilochiarlone@gmail.com>
Signed-off-by: danbugs <danilochiarlone@gmail.com>
Signed-off-by: danbugs <danilochiarlone@gmail.com>
Copilot AI review requested due to automatic review settings July 8, 2026 17:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a new runnable pyhl container image intended for hyperlight-on-kubernetes device plugin deployments, and wires it into the existing GHCR publishing workflow.

Changes:

  • Adds a multi-stage Dockerfile that bundles the pyhl CLI plus the python-agent-driver kernel + initrd into a single container image.
  • Adds a container entrypoint that runs pyhl setup on first start (or supports --setup-only for init container usage) and then executes pyhl run.
  • Extends the existing GHCR publish workflow to build and push the pyhl image when host/** (and other relevant paths) change.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
host/pyhl.Dockerfile Builds a minimal runtime container bundling pyhl with the published kernel/initrd artifacts.
host/pyhl-entrypoint.sh Bootstraps the pyhl install/snapshot on first run and supports --setup-only for init containers.
.github/workflows/publish-examples.yml Adds a publish-pyhl job and triggers publishing when host/** changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread host/pyhl-entrypoint.sh Outdated
Comment thread host/pyhl-entrypoint.sh Outdated

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Linux Benchmarks

Details
Benchmark suite Current: 76b2a9c Previous: 71c543b Ratio
hello_world (median) 20 ms 20 ms 1
pandas (median) 110 ms 110 ms 1
density (per VM) 12 MB 12 MB 1
snapshot (disk) 701 MiB 701 MiB 1

This comment was automatically generated by workflow using github-action-benchmark.

Signed-off-by: danbugs <danilochiarlone@gmail.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Windows Benchmarks

Details
Benchmark suite Current: 76b2a9c Previous: 71c543b Ratio
hello_world (median) 425 ms 382 ms 1.11
pandas (median) 1216 ms 1048 ms 1.16
density (per VM) 11 MB 11 MB 1
snapshot (disk) 727 MiB 727 MiB 1

This comment was automatically generated by workflow using github-action-benchmark.

@danbugs
danbugs merged commit c7adf56 into main Jul 8, 2026
89 checks passed
@danbugs
danbugs deleted the feat/pyhl-container-image branch July 8, 2026 18:16
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.

2 participants