4040 # https://github.com/ggml-org/llama.cpp/issues/11888
4141 # - { tag: "cpu", dockerfile: ".devops/cpu.Dockerfile", platforms: "linux/amd64,linux/arm64", full: true, light: true, server: true, free_disk_space: false }
4242 - { tag: "cpu", dockerfile: ".devops/cpu.Dockerfile", platforms: "linux/amd64", full: true, light: true, server: true, free_disk_space: false, runs_on: "ubuntu-22.04" }
43- - { tag: "cuda", dockerfile: ".devops/cuda.Dockerfile", platforms: "linux/amd64", full: true, light: true, server: true, free_disk_space: true, runs_on: "ubuntu-22.04" }
43+ - { tag: "cuda cuda12", dockerfile: ".devops/cuda.Dockerfile", platforms: "linux/amd64", full: true, light: true, server: true, free_disk_space: true, runs_on: "ubuntu-22.04", cuda_version: "12.4.0", ubuntu_version: "22.04" }
44+ - { tag: "cuda13", dockerfile: ".devops/cuda-new.Dockerfile", platforms: "linux/amd64", full: true, light: true, server: true, free_disk_space: true, runs_on: "ubuntu-22.04", cuda_version: "13.1.0", ubuntu_version: "24.04" }
4445 - { tag: "musa", dockerfile: ".devops/musa.Dockerfile", platforms: "linux/amd64", full: true, light: true, server: true, free_disk_space: true, runs_on: "ubuntu-22.04" }
4546 - { tag: "intel", dockerfile: ".devops/intel.Dockerfile", platforms: "linux/amd64", full: true, light: true, server: true, free_disk_space: true, runs_on: "ubuntu-22.04" }
4647 - { tag: "vulkan", dockerfile: ".devops/vulkan.Dockerfile", platforms: "linux/amd64", full: true, light: true, server: true, free_disk_space: false, runs_on: "ubuntu-22.04" }
@@ -80,18 +81,21 @@ jobs:
8081 run : |
8182 REPO_OWNER="${GITHUB_REPOSITORY_OWNER@L}" # to lower case
8283 REPO_NAME="${{ github.event.repository.name }}"
84+ PREFIX="ghcr.io/${REPO_OWNER}/${REPO_NAME}:"
8385
8486 # list all tags possible
85- if [[ "${{ matrix.config.tag }}" == "cpu" ]]; then
86- TYPE=""
87- else
88- TYPE="-${{ matrix.config.tag }}"
89- fi
90- PREFIX="ghcr.io/${REPO_OWNER}/${REPO_NAME}:"
91- CACHETAGS="${PREFIX}buildcache${TYPE}"
92- FULLTAGS="${PREFIX}full${TYPE},${PREFIX}full${TYPE}-${{ steps.srctag.outputs.name }}"
93- LIGHTTAGS="${PREFIX}light${TYPE},${PREFIX}light${TYPE}-${{ steps.srctag.outputs.name }}"
94- SERVERTAGS="${PREFIX}server${TYPE},${PREFIX}server${TYPE}-${{ steps.srctag.outputs.name }}"
87+ tags="${{ matrix.config.tag }}"
88+ for tag in $tags; do
89+ if [[ "$tag" == "cpu" ]]; then
90+ TYPE=""
91+ else
92+ TYPE="-$tag"
93+ fi
94+ CACHETAGS="${PREFIX}buildcache${TYPE}"
95+ FULLTAGS="${FULLTAGS:+$FULLTAGS,}${PREFIX}full${TYPE},${PREFIX}full${TYPE}-${{ steps.srctag.outputs.name }}"
96+ LIGHTTAGS="${LIGHTTAGS:+$LIGHTTAGS,}${PREFIX}light${TYPE},${PREFIX}light${TYPE}-${{ steps.srctag.outputs.name }}"
97+ SERVERTAGS="${SERVERTAGS:+$SERVERTAGS,}${PREFIX}server${TYPE},${PREFIX}server${TYPE}-${{ steps.srctag.outputs.name }}"
98+ done
9599 echo "cache_output_tags=$CACHETAGS" >> $GITHUB_OUTPUT
96100 echo "full_output_tags=$FULLTAGS" >> $GITHUB_OUTPUT
97101 echo "light_output_tags=$LIGHTTAGS" >> $GITHUB_OUTPUT
@@ -132,6 +136,9 @@ jobs:
132136 file : ${{ matrix.config.dockerfile }}
133137 target : full
134138 provenance : false
139+ build-args : |
140+ ${{ matrix.config.ubuntu_version && format('UBUNTU_VERSION={0}', matrix.config.ubuntu_version) || '' }}
141+ ${{ matrix.config.cuda_version && format('CUDA_VERSION={0}', matrix.config.cuda_version) || '' }}
135142 # using github experimental cache
136143 # cache-from: type=gha
137144 # cache-to: type=gha,mode=max
@@ -154,6 +161,9 @@ jobs:
154161 file : ${{ matrix.config.dockerfile }}
155162 target : light
156163 provenance : false
164+ build-args : |
165+ ${{ matrix.config.ubuntu_version && format('UBUNTU_VERSION={0}', matrix.config.ubuntu_version) || '' }}
166+ ${{ matrix.config.cuda_version && format('CUDA_VERSION={0}', matrix.config.cuda_version) || '' }}
157167 # using github experimental cache
158168 # cache-from: type=gha
159169 # cache-to: type=gha,mode=max
@@ -176,6 +186,9 @@ jobs:
176186 file : ${{ matrix.config.dockerfile }}
177187 target : server
178188 provenance : false
189+ build-args : |
190+ ${{ matrix.config.ubuntu_version && format('UBUNTU_VERSION={0}', matrix.config.ubuntu_version) || '' }}
191+ ${{ matrix.config.cuda_version && format('CUDA_VERSION={0}', matrix.config.cuda_version) || '' }}
179192 # using github experimental cache
180193 # cache-from: type=gha
181194 # cache-to: type=gha,mode=max
0 commit comments