fix: stop CI from filling runner disk
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 <noreply@anthropic.com>
This commit is contained in:
@@ -122,7 +122,12 @@ jobs:
|
|||||||
echo "build_version=$BUILD_VERSION" >> $GITHUB_OUTPUT
|
echo "build_version=$BUILD_VERSION" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Free disk space
|
- 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
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v4
|
uses: docker/setup-buildx-action@v4
|
||||||
@@ -142,5 +147,3 @@ jobs:
|
|||||||
provenance: false
|
provenance: false
|
||||||
tags: ${{ steps.tags.outputs.value }}
|
tags: ${{ steps.tags.outputs.value }}
|
||||||
build-args: BUILD_VERSION=${{ steps.tags.outputs.build_version }}
|
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
|
|
||||||
|
|||||||
Reference in New Issue
Block a user