-
Notifications
You must be signed in to change notification settings - Fork 1
89 lines (77 loc) · 2.29 KB
/
RK3588-Gemma3.yml
File metadata and controls
89 lines (77 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Build and Push Gemma3-RK3588 Series
on:
push:
branches: [ main, master ]
paths:
- 'src/llm/**'
- 'docker/RK3588/LLM/Gemma3.dockerfile'
- '.github/workflows/RK3588-Gemma3.yml'
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_BASE_NAME: ${{ github.repository_owner }}/RK3588-Gemma3
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
include:
- alias: "4b-w8a8"
file: "Gemma3-4B-W8A8_RK3588.rkllm"
url: "https://huggingface.co/JiahaoLi/Gemma3-RK3588/resolve/main/gemma3_4b_w8a8_rk3588_h0.25.rkllm"
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
- name: Force LFS Pull
run: |
git lfs install
git lfs pull
- name: Free Disk Space
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
android: true
dotnet: true
large-packages: true
docker-images: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_BASE_NAME }}
tags: |
type=raw,value=${{ matrix.alias }}-latest
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/RK3588/LLM/Gemma3.dockerfile
# 重要:不指定 target,确保所有指令被执行
push: true
platforms: linux/arm64
provenance: false
build-args: |
MODEL_URL=${{ matrix.url }}
MODEL_FILE=${{ matrix.file }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max