Skip to content

Commit

Permalink
place raft-cpu-image condition in one location
Browse files Browse the repository at this point in the history
  • Loading branch information
AyodeAwe committed Aug 12, 2024
1 parent 5669110 commit e50b55c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ on:
RAFT_ANN_BENCH_CPU_TAG:
required: true
type: string
BUILD_RAFT_ANN_BENCH_CPU_IMAGE:
required: true
type: boolean

jobs:
build:
Expand Down Expand Up @@ -146,7 +149,7 @@ jobs:
RAPIDS_VER=${{ inputs.RAPIDS_VER }}
tags: ${{ inputs.RAFT_ANN_BENCH_DATASETS_TAG }}-${{ matrix.ARCH }}
- name: Build RAFT ANN Benchmarks CPU image
if: inputs.CUDA_VER == '12.5.1' # we don't need to build CPU packages for different CUDA versions.
if: inputs.BUILD_RAFT_ANN_BENCH_CPU_IMAGE
uses: docker/build-push-action@v6
with:
context: context
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/build-test-publish-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ jobs:
LINUX_VER: ${{ matrix.LINUX_VER }}
PYTHON_VER: ${{ matrix.PYTHON_VER }}
RAPIDS_VER: ${{ needs.compute-matrix.outputs.RAPIDS_VER }}
BUILD_RAFT_ANN_BENCH_CPU_IMAGE: ${{ matrix.BUILD_RAFT_ANN_BENCH_CPU_IMAGE }}
BASE_TAG:
"rapidsai/${{ needs.compute-matrix.outputs.BASE_IMAGE_REPO }}:\
${{ needs.compute-matrix.outputs.BASE_TAG_PREFIX }}\
Expand Down Expand Up @@ -187,7 +188,7 @@ jobs:
- name: Create multiarch manifest
shell: bash
env:
RAFT_ANN_BENCH_CPU_IMAGE_BUILT: ${{ matrix.CUDA_TAG == '12.5.1' }}
RAFT_ANN_BENCH_CPU_IMAGE_BUILT: ${{ matrix.BUILD_RAFT_ANN_BENCH_CPU_IMAGE }}
BASE_IMAGE_REPO: ${{ needs.compute-matrix.outputs.BASE_IMAGE_REPO }}
BASE_TAG_PREFIX: ${{ needs.compute-matrix.outputs.BASE_TAG_PREFIX }}
RAPIDS_VER: ${{ needs.compute-matrix.outputs.RAPIDS_VER }}
Expand Down Expand Up @@ -243,7 +244,7 @@ jobs:
- name: Remove temporary images
shell: bash
env:
RAFT_ANN_BENCH_CPU_IMAGE_BUILT: ${{ matrix.CUDA_TAG == '12.5.1' }}
RAFT_ANN_BENCH_CPU_IMAGE_BUILT: ${{ matrix.BUILD_RAFT_ANN_BENCH_CPU_IMAGE }}
BASE_IMAGE_REPO: ${{ needs.compute-matrix.outputs.BASE_IMAGE_REPO }}
BASE_TAG_PREFIX: ${{ needs.compute-matrix.outputs.BASE_TAG_PREFIX }}
RAPIDS_VER: ${{ needs.compute-matrix.outputs.RAPIDS_VER }}
Expand Down
4 changes: 4 additions & 0 deletions ci/compute-matrix.jq
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ def compute_ubuntu_version($x):
def compute_cuda_tag($x):
$x + {CUDA_TAG: $x.CUDA_VER | split(".") | [.[0], .[1]] | join(".") };

def compute_build_raft_ann_bench_cpu_image($x):
$x + {BUILD_RAFT_ANN_BENCH_CPU_IMAGE: ($x.CUDA_VER == "12.5.1")}; # we don't need to build CPU packages for different CUDA versions.

# Checks the current entry to see if it matches the given exclude
def matches($entry; $exclude):
all($exclude | to_entries | .[]; $entry[.key] == .value);
Expand All @@ -37,6 +40,7 @@ def compute_matrix($input):
lists2dict($matrix_keys; .) |
compute_ubuntu_version(.) |
compute_cuda_tag(.) |
compute_build_raft_ann_bench_cpu_image(.) |
filter_excludes(.; $excludes) |
compute_arch(.)
] |
Expand Down

0 comments on commit e50b55c

Please sign in to comment.