Skip to content

refactor: update byo sample base images to work with substrate#2121

Merged
EItanya merged 4 commits into
mainfrom
refactor/sample-byo-base-image
Jul 1, 2026
Merged

refactor: update byo sample base images to work with substrate#2121
EItanya merged 4 commits into
mainfrom
refactor/sample-byo-base-image

Conversation

@jmhbh

@jmhbh jmhbh commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

The existing trixie-slim image which uses glibc 2.41 runs into a segfault when running on substrate. This is due to gvisor unable to restore a process linked to glibc 2.41 but works against bookworm's glibc 2.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 the uv-managed preference which statically linked libpython which is not corrupted on substrate restore.

Testing

  • Deployed and tested all variations of the sample BYO agents as Agent and SandboxAgent.

jmhbh added 3 commits June 30, 2026 18:50
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>
Copilot AI review requested due to automatic review settings June 30, 2026 23:41

Copilot AI 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.

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-slim to ghcr.io/astral-sh/uv:python3.13-bookworm-slim.
  • Configure uv to prefer managed (standalone) Python via UV_PYTHON_PREFERENCE=only-managed and UV_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 EItanya merged commit 20b19c7 into main Jul 1, 2026
26 checks passed
@EItanya EItanya deleted the refactor/sample-byo-base-image branch July 1, 2026 13:24
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.

3 participants