fix: resolve ENOSPC on CI by using BuildKit pip cache and registry layer cache
- Add `# syntax=docker/dockerfile:1` to enable BuildKit cache mounts - Replace `--no-cache-dir` pip installs with `--mount=type=cache,target=/root/.cache/pip` so torch/CUDA wheels are reused across builds instead of re-downloaded every run - Add `docker system prune -f` step before build to free dangling image/layer space - Add `cache-from`/`cache-to` pointing to `:cache` tag so unchanged layers (including the heavy voice-deps layer) are pulled from registry instead of rebuilt Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -121,6 +121,9 @@ jobs:
|
||||
echo "value=$TAGS" >> $GITHUB_OUTPUT
|
||||
echo "build_version=$BUILD_VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Free disk space
|
||||
run: docker system prune -f || true
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v4
|
||||
|
||||
@@ -138,3 +141,5 @@ jobs:
|
||||
push: true
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user