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