Parent: #2491
Idea
During make, podman accumulates dangling layers from multi-stage builds (ROCm pytorch is especially heavy). Clean up during the build without deleting the tagged output image.
Approach
Why not post-make prune
#2489 showed that podman system prune -af after make deletes the built image before testcontainers, image tests, OpenShift tests, and check-payload. Any cleanup must not touch the final artifact.
Scope
Makefile image macro / podman build invocation
- ROCm pytorch targets first (
rocm-jupyter-pytorch, rocm-runtime-pytorch)
- Generalize if pattern works for other large images
Acceptance criteria
Parent: #2491
Idea
During
make, podman accumulates dangling layers from multi-stage builds (ROCm pytorch is especially heavy). Clean up during the build without deleting the tagged output image.Approach
podman container prune -f${OUTPUT_IMAGE}/ the matrix job's final tagmonitor_resources.pyif ISSUE#3965: modernize resource monitoring and remove obsolete LVM overlay opendatahub-io/notebooks#3967 is backported)Why not post-
makeprune#2489 showed that
podman system prune -afaftermakedeletes the built image before testcontainers, image tests, OpenShift tests, and check-payload. Any cleanup must not touch the final artifact.Scope
Makefileimagemacro / podman build invocationrocm-jupyter-pytorch,rocm-runtime-pytorch)Acceptance criteria
makeis lower on ROCm pytorch jobsImageNotFound)