mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
perf: parallelize model downloads and switch to registry cache
- Parallelize all 14 model downloads using ThreadPoolExecutor (6 workers) Downloads were sequential (~30 min), now concurrent (~5-10 min) - Switch Docker cache from type=gha to type=registry (GHCR) GHA cache has 10 GB limit causing blob eviction and corrupted builds Registry cache has no size limit and persists across runner instances - Add pip download cache mounts to all pip install layers Prevents re-downloading packages when layers rebuild
This commit is contained in:
@@ -99,6 +99,13 @@ jobs:
|
||||
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to GHCR (for registry cache)
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GHCR_TOKEN }}
|
||||
|
||||
- uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
@@ -106,5 +113,5 @@ jobs:
|
||||
push: false
|
||||
tags: ashim:ci
|
||||
build-args: SKIP_MODEL_DOWNLOADS=true
|
||||
cache-from: type=gha,scope=unified
|
||||
cache-to: type=gha,mode=max,scope=unified
|
||||
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}:cache-linux-amd64
|
||||
cache-to: type=registry,ref=ghcr.io/${{ github.repository }}:cache-ci,mode=max
|
||||
|
||||
@@ -121,8 +121,8 @@ jobs:
|
||||
platforms: ${{ matrix.platform }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
outputs: type=image,"name=ashimhq/ashim,ghcr.io/${{ github.repository }}",push-by-digest=true,name-canonical=true,push=true
|
||||
cache-from: type=gha,scope=${{ env.PLATFORM_PAIR }}
|
||||
cache-to: type=gha,mode=max,scope=${{ env.PLATFORM_PAIR }}
|
||||
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}:cache-${{ env.PLATFORM_PAIR }}
|
||||
cache-to: type=registry,ref=ghcr.io/${{ github.repository }}:cache-${{ env.PLATFORM_PAIR }},mode=max
|
||||
|
||||
- name: Export digest
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user