Improve docker build cleanup on s390x runners (#149316)

Currently it sometimes still leaves a couple of processess running.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/149316
Approved by: https://github.com/seemethere
This commit is contained in:
Aleksei Nikiforov 2025-03-19 10:10:44 +00:00 committed by PyTorch MergeBot
parent 466d5295c1
commit cfbeaf7b7e

View File

@ -62,7 +62,12 @@ jobs:
if: cancelled()
shell: bash
run: |
# if podman build command is interrupted,
# If podman build command is interrupted,
# it can leave a couple of processes still running.
# order them to stop for clean shutdown.
# Order them to stop for clean shutdown.
# It looks like sometimes some processes remain
# after first cleanup.
# Wait a bit and do cleanup again. It looks like it helps.
docker system prune --build -f || true
sleep 60
docker system prune --build -f || true