2023-03-19 22:50:31 +00:00
|
|
|
---
|
|
|
|
name: 'build container images'
|
|
|
|
|
|
|
|
on:
|
2023-04-12 23:16:13 +00:00
|
|
|
pull_request:
|
2023-03-19 22:50:31 +00:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
tags:
|
|
|
|
- '*'
|
|
|
|
|
2023-05-19 06:31:11 +00:00
|
|
|
concurrency:
|
|
|
|
group: ci-${{ github.head_ref || github.ref }}-${{ github.repository }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2023-03-19 22:50:31 +00:00
|
|
|
jobs:
|
2023-11-30 18:24:37 +00:00
|
|
|
extras-image-build:
|
|
|
|
uses: ./.github/workflows/image_build.yml
|
|
|
|
with:
|
|
|
|
tag-latest: ${{ matrix.tag-latest }}
|
|
|
|
tag-suffix: ${{ matrix.tag-suffix }}
|
|
|
|
ffmpeg: ${{ matrix.ffmpeg }}
|
|
|
|
image-type: ${{ matrix.image-type }}
|
|
|
|
build-type: ${{ matrix.build-type }}
|
|
|
|
cuda-major-version: ${{ matrix.cuda-major-version }}
|
|
|
|
cuda-minor-version: ${{ matrix.cuda-minor-version }}
|
|
|
|
platforms: ${{ matrix.platforms }}
|
|
|
|
runs-on: ${{ matrix.runs-on }}
|
|
|
|
secrets:
|
|
|
|
dockerUsername: ${{ secrets.LOCALAI_REGISTRY_USERNAME }}
|
|
|
|
dockerPassword: ${{ secrets.LOCALAI_REGISTRY_PASSWORD }}
|
2023-05-31 17:51:02 +00:00
|
|
|
strategy:
|
2023-11-30 16:45:20 +00:00
|
|
|
# Pushing with all jobs in parallel
|
|
|
|
# eats the bandwidth of all the nodes
|
2023-11-30 18:24:37 +00:00
|
|
|
max-parallel: ${{ github.event_name != 'pull_request' && 2 || 4 }}
|
2023-05-31 17:51:02 +00:00
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- build-type: ''
|
2023-10-16 19:46:29 +00:00
|
|
|
#platforms: 'linux/amd64,linux/arm64'
|
|
|
|
platforms: 'linux/amd64'
|
2023-05-31 17:51:02 +00:00
|
|
|
tag-latest: 'auto'
|
|
|
|
tag-suffix: ''
|
2023-06-04 12:00:21 +00:00
|
|
|
ffmpeg: ''
|
2023-11-20 22:01:31 +00:00
|
|
|
image-type: 'extras'
|
|
|
|
runs-on: 'arc-runner-set'
|
2023-10-29 21:04:43 +00:00
|
|
|
- build-type: ''
|
|
|
|
platforms: 'linux/amd64'
|
|
|
|
tag-latest: 'false'
|
|
|
|
tag-suffix: '-ffmpeg'
|
|
|
|
ffmpeg: 'true'
|
2023-11-20 22:01:31 +00:00
|
|
|
image-type: 'extras'
|
|
|
|
runs-on: 'arc-runner-set'
|
2023-05-31 17:51:02 +00:00
|
|
|
- build-type: 'cublas'
|
2023-11-30 18:24:37 +00:00
|
|
|
cuda-major-version: "11"
|
|
|
|
cuda-minor-version: "7"
|
2023-05-31 17:51:02 +00:00
|
|
|
platforms: 'linux/amd64'
|
|
|
|
tag-latest: 'false'
|
|
|
|
tag-suffix: '-cublas-cuda11'
|
2023-06-04 12:00:21 +00:00
|
|
|
ffmpeg: ''
|
2023-11-20 22:01:31 +00:00
|
|
|
image-type: 'extras'
|
|
|
|
runs-on: 'arc-runner-set'
|
2023-05-31 17:51:02 +00:00
|
|
|
- build-type: 'cublas'
|
2023-11-30 18:24:37 +00:00
|
|
|
cuda-major-version: "12"
|
|
|
|
cuda-minor-version: "1"
|
2023-05-31 17:51:02 +00:00
|
|
|
platforms: 'linux/amd64'
|
|
|
|
tag-latest: 'false'
|
|
|
|
tag-suffix: '-cublas-cuda12'
|
2023-06-04 12:00:21 +00:00
|
|
|
ffmpeg: ''
|
2023-11-20 22:01:31 +00:00
|
|
|
image-type: 'extras'
|
|
|
|
runs-on: 'arc-runner-set'
|
2023-06-04 12:00:21 +00:00
|
|
|
- build-type: 'cublas'
|
2023-11-30 18:24:37 +00:00
|
|
|
cuda-major-version: "11"
|
|
|
|
cuda-minor-version: "7"
|
2023-06-04 12:00:21 +00:00
|
|
|
platforms: 'linux/amd64'
|
|
|
|
tag-latest: 'false'
|
|
|
|
tag-suffix: '-cublas-cuda11-ffmpeg'
|
|
|
|
ffmpeg: 'true'
|
2023-11-20 22:01:31 +00:00
|
|
|
image-type: 'extras'
|
|
|
|
runs-on: 'arc-runner-set'
|
2023-06-04 12:00:21 +00:00
|
|
|
- build-type: 'cublas'
|
2023-11-30 18:24:37 +00:00
|
|
|
cuda-major-version: "12"
|
|
|
|
cuda-minor-version: "1"
|
2023-06-04 12:00:21 +00:00
|
|
|
platforms: 'linux/amd64'
|
|
|
|
tag-latest: 'false'
|
|
|
|
tag-suffix: '-cublas-cuda12-ffmpeg'
|
|
|
|
ffmpeg: 'true'
|
2023-11-20 22:01:31 +00:00
|
|
|
image-type: 'extras'
|
|
|
|
runs-on: 'arc-runner-set'
|
|
|
|
- build-type: ''
|
|
|
|
#platforms: 'linux/amd64,linux/arm64'
|
|
|
|
platforms: 'linux/amd64'
|
|
|
|
tag-latest: 'auto'
|
|
|
|
tag-suffix: ''
|
|
|
|
ffmpeg: ''
|
|
|
|
image-type: 'extras'
|
|
|
|
runs-on: 'arc-runner-set'
|
2023-11-30 18:24:37 +00:00
|
|
|
core-image-build:
|
|
|
|
uses: ./.github/workflows/image_build.yml
|
|
|
|
with:
|
|
|
|
tag-latest: ${{ matrix.tag-latest }}
|
|
|
|
tag-suffix: ${{ matrix.tag-suffix }}
|
|
|
|
ffmpeg: ${{ matrix.ffmpeg }}
|
|
|
|
image-type: ${{ matrix.image-type }}
|
|
|
|
build-type: ${{ matrix.build-type }}
|
|
|
|
cuda-major-version: ${{ matrix.cuda-major-version }}
|
|
|
|
cuda-minor-version: ${{ matrix.cuda-minor-version }}
|
|
|
|
platforms: ${{ matrix.platforms }}
|
|
|
|
runs-on: ${{ matrix.runs-on }}
|
|
|
|
secrets:
|
|
|
|
dockerUsername: ${{ secrets.LOCALAI_REGISTRY_USERNAME }}
|
|
|
|
dockerPassword: ${{ secrets.LOCALAI_REGISTRY_PASSWORD }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
include:
|
2023-11-20 22:01:31 +00:00
|
|
|
- build-type: ''
|
|
|
|
platforms: 'linux/amd64'
|
|
|
|
tag-latest: 'false'
|
|
|
|
tag-suffix: '-ffmpeg-core'
|
|
|
|
ffmpeg: 'true'
|
|
|
|
image-type: 'core'
|
|
|
|
runs-on: 'ubuntu-latest'
|
|
|
|
- build-type: 'cublas'
|
2023-11-30 18:24:37 +00:00
|
|
|
cuda-major-version: "11"
|
|
|
|
cuda-minor-version: "7"
|
2023-11-20 22:01:31 +00:00
|
|
|
platforms: 'linux/amd64'
|
|
|
|
tag-latest: 'false'
|
|
|
|
tag-suffix: '-cublas-cuda11-core'
|
|
|
|
ffmpeg: ''
|
|
|
|
image-type: 'core'
|
|
|
|
runs-on: 'ubuntu-latest'
|
|
|
|
- build-type: 'cublas'
|
2023-11-30 18:24:37 +00:00
|
|
|
cuda-major-version: "12"
|
|
|
|
cuda-minor-version: "1"
|
2023-11-20 22:01:31 +00:00
|
|
|
platforms: 'linux/amd64'
|
|
|
|
tag-latest: 'false'
|
|
|
|
tag-suffix: '-cublas-cuda12-core'
|
|
|
|
ffmpeg: ''
|
|
|
|
image-type: 'core'
|
|
|
|
runs-on: 'ubuntu-latest'
|
|
|
|
- build-type: 'cublas'
|
2023-11-30 18:24:37 +00:00
|
|
|
cuda-major-version: "11"
|
|
|
|
cuda-minor-version: "7"
|
2023-11-20 22:01:31 +00:00
|
|
|
platforms: 'linux/amd64'
|
|
|
|
tag-latest: 'false'
|
|
|
|
tag-suffix: '-cublas-cuda11-ffmpeg-core'
|
|
|
|
ffmpeg: 'true'
|
|
|
|
image-type: 'core'
|
|
|
|
runs-on: 'ubuntu-latest'
|
|
|
|
- build-type: 'cublas'
|
2023-11-30 18:24:37 +00:00
|
|
|
cuda-major-version: "12"
|
|
|
|
cuda-minor-version: "1"
|
2023-11-20 22:01:31 +00:00
|
|
|
platforms: 'linux/amd64'
|
|
|
|
tag-latest: 'false'
|
|
|
|
tag-suffix: '-cublas-cuda12-ffmpeg-core'
|
|
|
|
ffmpeg: 'true'
|
|
|
|
image-type: 'core'
|
|
|
|
runs-on: 'ubuntu-latest'
|