Skip to content

Commit bdfa5e9

Browse files
committed
ci: switch image/backend build cache to a dedicated registry image
- Switch cache-from/cache-to in backend_build.yml and image_build.yml from the unused gha cache to type=registry pointing at quay.io/go-skynet/ci-cache:cache<tag-suffix>, mode=max with ignore-error=true. Master/tag builds populate their own per-matrix-entry cache; PR builds read-only. - Drop the broken generate_grpc_cache.yaml cron. It targeted a `grpc` Dockerfile stage that was removed by b1fc5ac in July 2025, has been failing every night since, and never populated the gha cache. The new registry-cache scheme is self-warming, so no separate populator is needed. - Remove the dead GRPC_VERSION / GRPC_BASE_IMAGE / GRPC_MAKEFLAGS build-args from image_build.yml and the orphan ARG GRPC_BASE_IMAGE in the root Dockerfile (the root Dockerfile no longer compiles gRPC; the source build now lives in backend/Dockerfile.{llama-cpp, ik-llama-cpp, turboquant} only and uses its own ARG defaults). - Drop the unused grpc-base-image input from image_build.yml plus the matrix passthroughs in image.yml / image-pr.yml. - Drop the unused GRPC_VERSION env in test.yml. Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Assisted-by: claude-code:claude-opus-4-7-1m
1 parent deca6db commit bdfa5e9

7 files changed

Lines changed: 7 additions & 132 deletions

File tree

.github/workflows/backend_build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,8 @@ jobs:
224224
AMDGPU_TARGETS=${{ inputs.amdgpu-targets }}
225225
context: ${{ inputs.context }}
226226
file: ${{ inputs.dockerfile }}
227-
cache-from: type=gha
227+
cache-from: type=registry,ref=quay.io/go-skynet/ci-cache:cache${{ inputs.tag-suffix }}
228+
cache-to: type=registry,ref=quay.io/go-skynet/ci-cache:cache${{ inputs.tag-suffix }},mode=max,ignore-error=true
228229
platforms: ${{ inputs.platforms }}
229230
push: ${{ github.event_name != 'pull_request' }}
230231
tags: ${{ steps.meta.outputs.tags }}
@@ -246,7 +247,7 @@ jobs:
246247
AMDGPU_TARGETS=${{ inputs.amdgpu-targets }}
247248
context: ${{ inputs.context }}
248249
file: ${{ inputs.dockerfile }}
249-
cache-from: type=gha
250+
cache-from: type=registry,ref=quay.io/go-skynet/ci-cache:cache${{ inputs.tag-suffix }}
250251
platforms: ${{ inputs.platforms }}
251252
push: ${{ env.quay_username != '' }}
252253
tags: ${{ steps.meta_pull_request.outputs.tags }}

.github/workflows/generate_grpc_cache.yaml

Lines changed: 0 additions & 96 deletions
This file was deleted.

.github/workflows/image-pr.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
platforms: ${{ matrix.platforms }}
2121
runs-on: ${{ matrix.runs-on }}
2222
base-image: ${{ matrix.base-image }}
23-
grpc-base-image: ${{ matrix.grpc-base-image }}
2423
makeflags: ${{ matrix.makeflags }}
2524
ubuntu-version: ${{ matrix.ubuntu-version }}
2625
secrets:
@@ -60,15 +59,13 @@
6059
tag-latest: 'false'
6160
tag-suffix: '-hipblas'
6261
base-image: "rocm/dev-ubuntu-24.04:7.2.1"
63-
grpc-base-image: "ubuntu:24.04"
6462
runs-on: 'ubuntu-latest'
6563
makeflags: "--jobs=3 --output-sync=target"
6664
ubuntu-version: '2404'
6765
- build-type: 'sycl'
6866
platforms: 'linux/amd64'
6967
tag-latest: 'false'
7068
base-image: "intel/oneapi-basekit:2025.3.2-0-devel-ubuntu24.04"
71-
grpc-base-image: "ubuntu:24.04"
7269
tag-suffix: 'sycl'
7370
runs-on: 'ubuntu-latest'
7471
makeflags: "--jobs=3 --output-sync=target"

.github/workflows/image.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
platforms: ${{ matrix.platforms }}
2626
runs-on: ${{ matrix.runs-on }}
2727
base-image: ${{ matrix.base-image }}
28-
grpc-base-image: ${{ matrix.grpc-base-image }}
2928
makeflags: ${{ matrix.makeflags }}
3029
ubuntu-version: ${{ matrix.ubuntu-version }}
3130
ubuntu-codename: ${{ matrix.ubuntu-codename }}
@@ -42,12 +41,11 @@
4241
tag-latest: 'auto'
4342
tag-suffix: '-gpu-hipblas'
4443
base-image: "rocm/dev-ubuntu-24.04:7.2.1"
45-
grpc-base-image: "ubuntu:24.04"
4644
runs-on: 'ubuntu-latest'
4745
makeflags: "--jobs=3 --output-sync=target"
4846
ubuntu-version: '2404'
4947
ubuntu-codename: 'noble'
50-
48+
5149
core-image-build:
5250
if: github.repository == 'mudler/LocalAI'
5351
uses: ./.github/workflows/image_build.yml
@@ -60,7 +58,6 @@
6058
platforms: ${{ matrix.platforms }}
6159
runs-on: ${{ matrix.runs-on }}
6260
base-image: ${{ matrix.base-image }}
63-
grpc-base-image: ${{ matrix.grpc-base-image }}
6461
makeflags: ${{ matrix.makeflags }}
6562
skip-drivers: ${{ matrix.skip-drivers }}
6663
ubuntu-version: ${{ matrix.ubuntu-version }}
@@ -122,7 +119,6 @@
122119
platforms: 'linux/amd64'
123120
tag-latest: 'auto'
124121
base-image: "intel/oneapi-basekit:2025.3.2-0-devel-ubuntu24.04"
125-
grpc-base-image: "ubuntu:24.04"
126122
tag-suffix: '-gpu-intel'
127123
runs-on: 'ubuntu-latest'
128124
makeflags: "--jobs=3 --output-sync=target"
@@ -141,7 +137,6 @@
141137
platforms: ${{ matrix.platforms }}
142138
runs-on: ${{ matrix.runs-on }}
143139
base-image: ${{ matrix.base-image }}
144-
grpc-base-image: ${{ matrix.grpc-base-image }}
145140
makeflags: ${{ matrix.makeflags }}
146141
skip-drivers: ${{ matrix.skip-drivers }}
147142
ubuntu-version: ${{ matrix.ubuntu-version }}

.github/workflows/image_build.yml

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ on:
88
description: 'Base image'
99
required: true
1010
type: string
11-
grpc-base-image:
12-
description: 'GRPC Base image, must be a compatible image with base-image'
13-
required: false
14-
default: ''
15-
type: string
1611
build-type:
1712
description: 'Build type'
1813
default: ''
@@ -201,25 +196,19 @@ jobs:
201196
if: github.event_name != 'pull_request'
202197
with:
203198
builder: ${{ steps.buildx.outputs.name }}
204-
# The build-args MUST be an EXACT match between the image cache and other workflow steps that want to use that cache.
205-
# This means that even the MAKEFLAGS have to be an EXACT match.
206-
# If the build-args are not an EXACT match, it will result in a cache miss, which will require GRPC to be built from scratch.
207-
# This is why some build args like GRPC_VERSION and MAKEFLAGS are hardcoded
208199
build-args: |
209200
BUILD_TYPE=${{ inputs.build-type }}
210201
CUDA_MAJOR_VERSION=${{ inputs.cuda-major-version }}
211202
CUDA_MINOR_VERSION=${{ inputs.cuda-minor-version }}
212203
BASE_IMAGE=${{ inputs.base-image }}
213-
GRPC_BASE_IMAGE=${{ inputs.grpc-base-image || inputs.base-image }}
214-
GRPC_MAKEFLAGS=--jobs=4 --output-sync=target
215-
GRPC_VERSION=v1.65.0
216204
MAKEFLAGS=${{ inputs.makeflags }}
217205
SKIP_DRIVERS=${{ inputs.skip-drivers }}
218206
UBUNTU_VERSION=${{ inputs.ubuntu-version }}
219207
UBUNTU_CODENAME=${{ inputs.ubuntu-codename }}
220208
context: .
221209
file: ./Dockerfile
222-
cache-from: type=gha
210+
cache-from: type=registry,ref=quay.io/go-skynet/ci-cache:cache-localai${{ inputs.tag-suffix }}
211+
cache-to: type=registry,ref=quay.io/go-skynet/ci-cache:cache-localai${{ inputs.tag-suffix }},mode=max,ignore-error=true
223212
platforms: ${{ inputs.platforms }}
224213
push: ${{ github.event_name != 'pull_request' }}
225214
tags: ${{ steps.meta.outputs.tags }}
@@ -230,25 +219,18 @@ jobs:
230219
if: github.event_name == 'pull_request'
231220
with:
232221
builder: ${{ steps.buildx.outputs.name }}
233-
# The build-args MUST be an EXACT match between the image cache and other workflow steps that want to use that cache.
234-
# This means that even the MAKEFLAGS have to be an EXACT match.
235-
# If the build-args are not an EXACT match, it will result in a cache miss, which will require GRPC to be built from scratch.
236-
# This is why some build args like GRPC_VERSION and MAKEFLAGS are hardcoded
237222
build-args: |
238223
BUILD_TYPE=${{ inputs.build-type }}
239224
CUDA_MAJOR_VERSION=${{ inputs.cuda-major-version }}
240225
CUDA_MINOR_VERSION=${{ inputs.cuda-minor-version }}
241226
BASE_IMAGE=${{ inputs.base-image }}
242-
GRPC_BASE_IMAGE=${{ inputs.grpc-base-image || inputs.base-image }}
243-
GRPC_MAKEFLAGS=--jobs=4 --output-sync=target
244-
GRPC_VERSION=v1.65.0
245227
MAKEFLAGS=${{ inputs.makeflags }}
246228
SKIP_DRIVERS=${{ inputs.skip-drivers }}
247229
UBUNTU_VERSION=${{ inputs.ubuntu-version }}
248230
UBUNTU_CODENAME=${{ inputs.ubuntu-codename }}
249231
context: .
250232
file: ./Dockerfile
251-
cache-from: type=gha
233+
cache-from: type=registry,ref=quay.io/go-skynet/ci-cache:cache-localai${{ inputs.tag-suffix }}
252234
platforms: ${{ inputs.platforms }}
253235
#push: true
254236
tags: ${{ steps.meta_pull_request.outputs.tags }}

.github/workflows/test.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ on:
99
tags:
1010
- '*'
1111

12-
env:
13-
GRPC_VERSION: v1.65.0
14-
1512
concurrency:
1613
group: ci-tests-${{ github.head_ref || github.ref }}-${{ github.repository }}
1714
cancel-in-progress: true

Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
ARG BASE_IMAGE=ubuntu:24.04
2-
ARG GRPC_BASE_IMAGE=${BASE_IMAGE}
32
ARG INTEL_BASE_IMAGE=${BASE_IMAGE}
43
ARG UBUNTU_CODENAME=noble
54

0 commit comments

Comments
 (0)