refactor: update byo sample base images to work with substrate#2121
Merged
Conversation
Signed-off-by: JM Huibonhoa <jm.huibonhoa@solo.io>
Signed-off-by: JM Huibonhoa <jm.huibonhoa@solo.io>
Signed-off-by: JM Huibonhoa <jm.huibonhoa@solo.io>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Python BYO sample Dockerfiles to avoid substrate gVisor checkpoint/restore failures by switching off the python3.13-trixie-slim (glibc 2.41) base and aligning with a bookworm-based image (glibc 2.36), while configuring uv-managed Python to use the standalone interpreter.
Changes:
- Switch sample base images from
ghcr.io/astral-sh/uv:python3.13-trixie-slimtoghcr.io/astral-sh/uv:python3.13-bookworm-slim. - Configure uv to prefer managed (standalone) Python via
UV_PYTHON_PREFERENCE=only-managedandUV_PYTHON_INSTALL_DIR=/python. - Add in-file rationale comments describing the substrate/gVisor + glibc compatibility issue.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| python/samples/langgraph/kebab/Dockerfile | Move to bookworm-based uv image and enable uv-managed Python settings for substrate compatibility. |
| python/samples/langgraph/hitl-tools/Dockerfile | Same base-image and uv-managed Python preference updates for substrate. |
| python/samples/langgraph/currency/Dockerfile | Same base-image and uv-managed Python preference updates for substrate. |
| python/samples/crewai/research-crew/Dockerfile | Same base-image and uv-managed Python preference updates for substrate. |
| python/samples/crewai/poem_flow/Dockerfile | Same base-image and uv-managed Python preference updates for substrate. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+17
to
+21
| # this mirrors the kagent-adk's uv configuration and is needed to work on substrate | ||
| # as gVisor checkpoint/restore segfaults the base image's system | ||
| # CPython on restore and the standalone build survives. Both this and the bookworm base | ||
| # are needed for BYO to work on substrate as this pins the base image to use a base image with glibc 2.36 | ||
| # where as the prvious base image python3.13-trixie-slim used glibc 2.41 |
Comment on lines
+16
to
+20
| # this mirrors the kagent-adk's uv configuration and is needed to work on substrate | ||
| # as gVisor checkpoint/restore segfaults the base image's system | ||
| # CPython on restore and the standalone build survives. Both this and the bookworm base | ||
| # are needed for BYO to work on substrate as this pins the base image to use a base image with glibc 2.36 | ||
| # where as the prvious base image python3.13-trixie-slim used glibc 2.41 |
Comment on lines
+16
to
+20
| # this mirrors the kagent-adk's uv configuration and is needed to work on substrate | ||
| # as gVisor checkpoint/restore segfaults the base image's system | ||
| # CPython on restore and the standalone build survives. Both this and the bookworm base | ||
| # are needed for BYO to work on substrate as this pins the base image to use a base image with glibc 2.36 | ||
| # where as the prvious base image python3.13-trixie-slim used glibc 2.41 |
Comment on lines
+16
to
+20
| # this mirrors the kagent-adk's uv configuration and is needed to work on substrate | ||
| # as gVisor checkpoint/restore segfaults the base image's system | ||
| # CPython on restore and the standalone build survives. Both this and the bookworm base | ||
| # are needed for BYO to work on substrate as this pins the base image to use a base image with glibc 2.36 | ||
| # where as the prvious base image python3.13-trixie-slim used glibc 2.41 |
Comment on lines
+16
to
+20
| # this mirrors the kagent-adk's uv configuration and is needed to work on substrate | ||
| # as gVisor checkpoint/restore segfaults the base image's system | ||
| # CPython on restore and the standalone build survives. Both this and the bookworm base | ||
| # are needed for BYO to work on substrate as this pins the base image to use a base image with glibc 2.36 | ||
| # where as the prvious base image python3.13-trixie-slim used glibc 2.41 |
EItanya
approved these changes
Jul 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The existing
trixie-slimimage which uses glibc2.41runs into a segfault when running on substrate. This is due to gvisor unable to restore a process linked to glibc2.41but works against bookworm's glibc2.36. This PR updates the sample crew-ai, and langgraph BYO sample dockerfiles to use a base image confirmed to work with substrate as well as enables theuv-managedpreference which statically linked libpython which is not corrupted on substrate restore.Testing
AgentandSandboxAgent.