1
0
Fork 0
mirror of https://github.com/imjasonh/terraform-playground synced 2026-07-08 15:55:17 +00:00
terraform-playground/pymage/example
Jason Hall d587263759 lots of changes
Signed-off-by: Jason Hall <jason.hall@anysphere.co>
2026-06-10 17:05:36 -04:00
..
src/example lots of changes 2026-06-10 17:05:36 -04:00
.gitignore lots of changes 2026-06-10 17:05:36 -04:00
pyproject.toml lots of changes 2026-06-10 17:05:36 -04:00
README.md lots of changes 2026-06-10 17:05:36 -04:00
uv.lock lots of changes 2026-06-10 17:05:36 -04:00

pymage example

A small uv project with a realistic FastAPI dependency tree (~28 wheels). Use it to try pymage end-to-end.

Build

From the pymage module root (network required on first build to download wheels):

cd pymage
go run . build ./example \
  --push=false \
  --print-digest

Push to a registry. The base image and target platforms come from the [tool.pymage] table in pyproject.toml; supply the destination repo with --repo (or uncomment repo in that table) and the tag with -t:

go run . build ./example --repo registry.example.com/me/example -t latest

Defaults apply automatically:

  • uv.lock in the source directory (the positional arg)
  • [tool.pymage] base (cgr.dev/chainguard/python:latest, Python 3.14) and platforms (linux/amd64, linux/arm64)
  • [project.scripts] entrypoint (example)
  • PYTHONPATH=/app/src for the src layout

Run locally with uv

cd example
uv sync
uv run example
curl localhost:8080/healthz