|
19 | 19 | type: string |
20 | 20 | cuda-major-version: |
21 | 21 | description: 'CUDA major version' |
22 | | - default: "11" |
| 22 | + default: "12" |
23 | 23 | type: string |
24 | 24 | cuda-minor-version: |
25 | 25 | description: 'CUDA minor version' |
26 | | - default: "7" |
| 26 | + default: "5" |
27 | 27 | type: string |
28 | 28 | platforms: |
29 | 29 | description: 'Platforms' |
@@ -146,6 +146,10 @@ jobs: |
146 | 146 | type=ref,event=branch |
147 | 147 | type=semver,pattern={{raw}} |
148 | 148 | type=sha |
| 149 | + tagsCUDA11: | |
| 150 | + type=ref,event=branch |
| 151 | + type=semver,pattern={{raw}}-cuda11 |
| 152 | + type=sha |
149 | 153 | flavor: | |
150 | 154 | latest=${{ inputs.tag-latest }} |
151 | 155 | suffix=${{ inputs.tag-suffix }} |
@@ -274,6 +278,33 @@ jobs: |
274 | 278 | run: | |
275 | 279 | echo "Image is available at ttl.sh/localai-ci-pr-${{ github.event.number }}:${{ steps.meta_pull_request.outputs.version }}" >> $GITHUB_STEP_SUMMARY |
276 | 280 | ## End testing image |
| 281 | + - name: Build and push CUDA 11 |
| 282 | + uses: docker/build-push-action@v5 |
| 283 | + if: github.event_name != 'pull_request' |
| 284 | + with: |
| 285 | + builder: ${{ steps.buildx.outputs.name }} |
| 286 | + # The build-args MUST be an EXACT match between the image cache and other workflow steps that want to use that cache. |
| 287 | + # This means that even the MAKEFLAGS have to be an EXACT match. |
| 288 | + # If the build-args are not an EXACT match, it will result in a cache miss, which will require GRPC to be built from scratch. |
| 289 | + # This is why some build args like GRPC_VERSION and MAKEFLAGS are hardcoded |
| 290 | + build-args: | |
| 291 | + BUILD_TYPE=${{ inputs.build-type }} |
| 292 | + CUDA_MAJOR_VERSION=11 |
| 293 | + CUDA_MINOR_VERSION=8 |
| 294 | + FFMPEG=${{ inputs.ffmpeg }} |
| 295 | + IMAGE_TYPE=${{ inputs.image-type }} |
| 296 | + BASE_IMAGE=${{ inputs.base-image }} |
| 297 | + GRPC_BASE_IMAGE=${{ inputs.grpc-base-image || inputs.base-image }} |
| 298 | + GRPC_MAKEFLAGS=--jobs=4 --output-sync=target |
| 299 | + GRPC_VERSION=v1.64.0 |
| 300 | + MAKEFLAGS=${{ inputs.makeflags }} |
| 301 | + context: . |
| 302 | + file: ./Dockerfile |
| 303 | + cache-from: type=gha |
| 304 | + platforms: ${{ inputs.platforms }} |
| 305 | + push: ${{ github.event_name != 'pull_request' }} |
| 306 | + tags: ${{ steps.meta.outputs.tagsCUDA11 }} |
| 307 | + labels: ${{ steps.meta.outputs.labels }} |
277 | 308 | - name: Build and push AIO image |
278 | 309 | if: inputs.aio != '' |
279 | 310 | uses: docker/build-push-action@v5 |
@@ -324,7 +355,7 @@ jobs: |
324 | 355 | docker pull quay.io/go-skynet/local-ai:${{ steps.meta_aio.outputs.version }} |
325 | 356 | docker tag quay.io/go-skynet/local-ai:${{ steps.meta_aio.outputs.version }} quay.io/go-skynet/local-ai:${{ inputs.latest-image-aio }} |
326 | 357 | docker push quay.io/go-skynet/local-ai:${{ inputs.latest-image-aio }} |
327 | | - |
| 358 | +
|
328 | 359 | - name: job summary |
329 | 360 | run: | |
330 | 361 | echo "Built image: ${{ steps.meta.outputs.labels }}" >> $GITHUB_STEP_SUMMARY |
|
0 commit comments