Skip to content

ROCm CI: prune build intermediates during make, retain final image tag #2492

Description

@jiridanek

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

  • Peak disk during make is lower on ROCm pytorch jobs
  • Post-build tests still find the local image (no ImageNotFound)
  • Template test + push matrix ROCm amd64 legs pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions