From 3e42992f6718329ace1c5e6625127aa073a9bae5 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Thu, 2 Apr 2026 13:44:09 -0400 Subject: [PATCH] fix: stop CI from filling runner disk MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three sources of unbounded growth removed: - Drop cache-from/cache-to registry: on a persistent self-hosted runner the local BuildKit layer cache already provides between-run reuse; the registry cache was redundant and pushed ~2 GB of torch layers on every build - Switch docker system prune -f → -af so old :SHA-tagged images are removed, not just dangling ones (-f alone never touched named tags) - Add docker builder prune --keep-storage 5g to bound the local BuildKit cache; pip mount cache (torch etc.) is recently-used so survives, stale intermediate layers are evicted first Co-Authored-By: Claude Sonnet 4.6 --- .forgejo/workflows/ci.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 8173cf5..25b6eab 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -122,7 +122,12 @@ jobs: echo "build_version=$BUILD_VERSION" >> $GITHUB_OUTPUT - name: Free disk space - run: docker system prune -f || true + run: | + # Remove all unused images (including old :SHA tags) and containers. + docker system prune -af || true + # Keep the local BuildKit cache bounded so pip mount cache survives + # but stale intermediate layers don't accumulate indefinitely. + docker builder prune --keep-storage 5g -f || true - name: Set up Docker Buildx uses: docker/setup-buildx-action@v4 @@ -142,5 +147,3 @@ jobs: provenance: false tags: ${{ steps.tags.outputs.value }} build-args: BUILD_VERSION=${{ steps.tags.outputs.build_version }} - cache-from: type=registry,ref=${{ env.IMAGE }}:cache - cache-to: type=registry,ref=${{ env.IMAGE }}:cache,mode=max