Skip to content

Commit f96f849

Browse files
author
Piotr Stankiewicz
committed
Build model-runner images for CE
Signed-off-by: Piotr Stankiewicz <[email protected]>
1 parent e6fd394 commit f96f849

File tree

1 file changed

+84
-0
lines changed

1 file changed

+84
-0
lines changed

.github/workflows/ci.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Release model-runner images for CE
2+
run-name: Release model-runner images for CE, version ${{ inputs.releaseTag }}
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
pushLatest:
8+
description: 'Tag images produced by this job as latest'
9+
required: false
10+
type: boolean
11+
default: false
12+
releaseTag:
13+
description: 'Release tag'
14+
required: false
15+
type: string
16+
default: "test"
17+
pull_request:
18+
branches: [ "main" ]
19+
20+
jobs:
21+
build:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout repo
25+
uses: actions/checkout@v4
26+
27+
#- name: Format tags
28+
# id: tags
29+
# shell: bash
30+
# run: |
31+
# echo "cpu<<EOF" >> "$GITHUB_OUTPUT"
32+
# echo "docker/model-runner:${{ inputs.releaseTag }}" >> "$GITHUB_OUTPUT"
33+
# if [ "${{ inputs.pushLatest }}" == "true" ]; then
34+
# echo "docker/model-runner:latest" >> "$GITHUB_OUTPUT"
35+
# fi
36+
# echo 'EOF' >> "$GITHUB_OUTPUT"
37+
# echo "cuda<<EOF" >> "$GITHUB_OUTPUT"
38+
# echo "docker/model-runner:${{ inputs.releaseTag }}-cuda" >> "$GITHUB_OUTPUT"
39+
# if [ "${{ inputs.pushLatest }}" == "true" ]; then
40+
# echo "docker/model-runner:latest-cuda" >> "$GITHUB_OUTPUT"
41+
# fi
42+
# echo 'EOF' >> "$GITHUB_OUTPUT"
43+
44+
- name: Log in to DockerHub
45+
uses: docker/login-action@v3
46+
with:
47+
username: "docker"
48+
password: ${{ secrets.ORG_ACCESS_TOKEN }}
49+
50+
- name: Set up Buildx
51+
uses: docker/setup-buildx-action@v3
52+
with:
53+
version: "lab:latest"
54+
driver: cloud
55+
endpoint: "docker/make-product-smarter"
56+
install: true
57+
58+
- name: Build CPU image
59+
uses: docker/build-push-action@v5
60+
with:
61+
file: Dockerfile
62+
platforms: linux/amd64, linux/arm64
63+
build-args: |
64+
"LLAMA_SERVER_VERSION=v0.0.5-rc2"
65+
push: true
66+
sbom: true
67+
provenance: mode=max
68+
#tags: ${{ steps.tags.outputs.cpu }}
69+
tags: "docker/model-runner:test-cpu"
70+
71+
- name: Build CUDA image
72+
uses: docker/build-push-action@v5
73+
with:
74+
file: Dockerfile
75+
platforms: linux/amd64, linux/arm64
76+
build-args: |
77+
"LLAMA_SERVER_VERSION=v0.0.5-rc2"
78+
"LLAMA_SERVER_VARIANT=cuda"
79+
"BASE_IMAGE=nvidia/cuda:12.9.0-cudnn-runtime-ubuntu24.04"
80+
push: true
81+
sbom: true
82+
provenance: mode=max
83+
#tags: ${{ steps.tags.outputs.cuda }}
84+
tags: "docker/model-runner:test-cuda"

0 commit comments

Comments
 (0)