Skip to content

Merge pull request #6 from LJ-Hao/main #3

Merge pull request #6 from LJ-Hao/main

Merge pull request #6 from LJ-Hao/main #3

name: Build and Push DeepSeek-R1-RK3576 Series
on:
push:
branches: [ main, master ]
paths:
- 'src/llm/**'
- 'docker/RK3576/LLM/DeepSeek-R1-Distill-Qwen.dockerfile'
- '.github/workflows/RK3576-Deepseek-R1-Distill-Qwen.yml'
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_BASE_NAME: ${{ github.repository_owner }}/RK3576-Deepseek-R1-Distill-Qwen
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
include:
- alias: "1.5b-fp16"
file: "DeepSeek-R1-Distill-Qwen-1.5B_FP16_RK3576.rkllm"
url: "https://huggingface.co/JiahaoLi/DeepSeek-R1-Distill-Qwen-RK3576/resolve/main/DeepSeek-R1-Distill-Qwen-1.5B_FP16_RK3576.rkllm"
- alias: "1.5b-w4a16"
file: "DeepSeek-R1-Distill-Qwen-1.5B_W4A16_RK3576.rkllm"
url: "https://huggingface.co/JiahaoLi/DeepSeek-R1-Distill-Qwen-RK3576/resolve/main/DeepSeek-R1-Distill-Qwen-1.5B_W4A16_RK3576.rkllm"
- alias: "1.5b-w4a16-g128"
file: "DeepSeek-R1-Distill-Qwen-1.5B_W4A16_G128_RK3576.rkllm"
url: "https://huggingface.co/JiahaoLi/DeepSeek-R1-Distill-Qwen-RK3576/resolve/main/DeepSeek-R1-Distill-Qwen-1.5B_W4A16_G128_RK3576.rkllm"
- alias: "7b-w4a16"
file: "DeepSeek-R1-Distill-Qwen-7B_W4A16_RK3576.rkllm"
url: "https://huggingface.co/JiahaoLi/DeepSeek-R1-Distill-Qwen-RK3576/resolve/main/DeepSeek-R1-Distill-Qwen-7B_W4A16_RK3576.rkllm"
- alias: "7b-w4a16-g128"
file: "DeepSeek-R1-Distill-Qwen-7B_W4A16_G128_RK3576.rkllm"
url: "https://huggingface.co/JiahaoLi/DeepSeek-R1-Distill-Qwen-RK3576/resolve/main/DeepSeek-R1-Distill-Qwen-7B_W4A16_G128_RK3576.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/RK3576/LLM/DeepSeek-R1-Distill-Qwen.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