Skip to content

refactor(config): unify inference decode parameters handling #61

refactor(config): unify inference decode parameters handling

refactor(config): unify inference decode parameters handling #61

name: Build and Push Multi-Compute Images
on:
push:
branches:
- master
tags:
- "v*"
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAMESPACE: ${{ github.repository_owner }}
IMAGE_ROOT: deepseek-ocr
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
compute_cap:
- 80
- 86
- 89
- 120
cuda_version:
- "12.5.1"
- "12.9.1"
exclude:
- compute_cap: 120
cuda_version: "12.5.1"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata (tags, labels)
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_ROOT }}-cuda
tags: |
type=ref,event=branch
type=ref,event=tag
type=sha
type=raw,value=latest,enable={{is_default_branch}}
flavor: |
suffix=-cuda${{ matrix.cuda_version }}-cc${{ matrix.compute_cap }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
CUDA_COMPUTE_CAP=${{ matrix.compute_cap }}
CUDA_VERSION=${{ matrix.cuda_version }}