Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 41 additions & 20 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,34 +61,54 @@
contents: read
uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@release/26.10
with:
build_type: pull-request
build_type: ${{ inputs.build_type || 'branch' }}
matrix_name: conda-cpp-build
rocky8-clib-standalone-build:
needs: [build-details, rocky8-clib-standalone-build-matrix]
needs: [rocky8-clib-standalone-build-matrix]
runs-on: linux-${{ matrix.ARCH }}-cpu16
env:
RAPIDS_BUILD_TYPE: ${{ inputs.build_type || 'branch' }}
permissions:
actions: read
contents: read
id-token: write
packages: read
pull-requests: read
secrets: inherit # zizmor: ignore[secrets-inherit]
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.rocky8-clib-standalone-build-matrix.outputs.matrix) }}
with:
build_type: ${{ inputs.build_type || 'branch' }}
build-datetime: ${{ needs.build-details.outputs.build-datetime }}
branch: ${{ inputs.branch }}
arch: "${{matrix.ARCH}}"
date: ${{ inputs.date }}
container_image: "rapidsai/ci-wheel:26.10-cuda${{ matrix.CUDA_VER }}-${{ matrix.LINUX_VER }}-py${{ matrix.PY_VER }}"
node_type: "cpu16"
requires_license_builder: true
script: "ci/build_standalone_c.sh"
artifact-name: "libcuvs_c_${{ matrix.CUDA_VER }}_${{ matrix.ARCH }}.tar.gz"
file_to_upload: "libcuvs_c.tar.gz"
sha: ${{ inputs.sha }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ inputs.sha || github.sha }}
fetch-depth: 0
persist-credentials: false
- name: Standardize repository information
uses: rapidsai/shared-actions/rapids-github-info@main
with:
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
- uses: aws-actions/configure-aws-credentials@cbe3b392738ccf3f987d68400dafcf4b0624a56c # v6.2.4
with:
role-to-assume: ${{ vars.AWS_ROLE_ARN }}
aws-region: ${{ vars.AWS_REGION }}
role-duration-seconds: 10800
- name: Setup sccache-dist
uses: rapidsai/shared-actions/setup-sccache-dist@main
with:
request-timeout: 7140
- name: Build standalone C tarball
env:
CUVS_TARBALL_CUDA_VERSION: ${{ matrix.CUDA_VER }}
CUVS_TARBALL_PYTHON_VERSION: ${{ matrix.PY_VER }}
run: |
./build.sh tarball --tarball-build-tests
- name: Upload artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: libcuvs_c_${{ matrix.CUDA_VER }}_${{ matrix.ARCH }}.tar.gz
path: libcuvs_c.tar.gz
rust-build-matrix:
needs: cpp-build
permissions:
Expand Down Expand Up @@ -128,7 +148,7 @@
contents: read
uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@release/26.10
with:
build_type: pull-request
build_type: ${{ inputs.build_type || 'branch' }}
matrix_name: conda-cpp-build
matrix_filter: map(select(.ARCH == "amd64"))
go-build:
Expand Down Expand Up @@ -161,7 +181,7 @@
contents: read
uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@release/26.10
with:
build_type: pull-request
build_type: ${{ inputs.build_type || 'branch' }}
matrix_name: conda-cpp-build
matrix_filter: map(select(.ARCH == "amd64"))
java-build:
Expand Down Expand Up @@ -190,7 +210,8 @@
file_to_upload: "java/cuvs-java/target/"
sha: ${{ inputs.sha }}
lucene-build:
# Depends on the Java job for the cuvs-java artifact that cuvs-lucene builds against.
# Depends on the Java job for the cuvs-java artifact that cuvs-lucene builds against, and
# reuses its matrix so the two always agree on the set of CUDA versions.
needs: [java-build-matrix, java-build]
permissions:
actions: read
Expand Down
104 changes: 89 additions & 15 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@
- rocky8-clib-tests
- conda-java-build-and-tests-matrix
- conda-java-build-and-tests
- conda-java-tests-other-arch-matrix
- conda-java-tests-other-arch
- conda-lucene-build-and-tests
- conda-lucene-tests-other-arch
- rust-build-matrix
- rust-build
- go-build-matrix
Expand Down Expand Up @@ -563,30 +566,45 @@
build_type: pull-request
matrix_name: conda-cpp-build
rocky8-clib-standalone-build:
needs: [build-details, rocky8-clib-standalone-build-matrix]
needs: [rocky8-clib-standalone-build-matrix]
runs-on: linux-${{ matrix.ARCH }}-cpu16
env:
RAPIDS_BUILD_TYPE: pull-request
permissions:
actions: read
contents: read
id-token: write
packages: read
pull-requests: read
secrets: inherit # zizmor: ignore[secrets-inherit]
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.rocky8-clib-standalone-build-matrix.outputs.matrix) }}
with:
build_type: pull-request
build-datetime: ${{ needs.build-details.outputs.build-datetime }}
arch: "${{matrix.arch}}"
date: ${{ inputs.date }}_c
container_image: "rapidsai/ci-wheel:26.10-cuda${{ matrix.CUDA_VER }}-${{ matrix.LINUX_VER }}-py${{ matrix.PY_VER }}"
node_type: "cpu16"
requires_license_builder: true
script: "ci/build_standalone_c.sh --build-tests"
artifact-name: "libcuvs_c_${{ matrix.CUDA_VER }}_${{ matrix.ARCH }}.tar.gz"
file_to_upload: "libcuvs_c.tar.gz"
sha: ${{ inputs.sha }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ inputs.sha || github.sha }}
fetch-depth: 0
persist-credentials: false
- uses: aws-actions/configure-aws-credentials@cbe3b392738ccf3f987d68400dafcf4b0624a56c # v6.2.4
with:
role-to-assume: ${{ vars.AWS_ROLE_ARN }}
aws-region: ${{ vars.AWS_REGION }}
role-duration-seconds: 10800
- name: Setup sccache-dist
uses: rapidsai/shared-actions/setup-sccache-dist@main
with:
request-timeout: 7140
- name: Build standalone C tarball
env:
CUVS_TARBALL_CUDA_VERSION: ${{ matrix.CUDA_VER }}
CUVS_TARBALL_PYTHON_VERSION: ${{ matrix.PY_VER }}
run: |
./build.sh tarball --tarball-build-tests
- name: Upload artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: libcuvs_c_${{ matrix.CUDA_VER }}_${{ matrix.ARCH }}.tar.gz
path: libcuvs_c.tar.gz
rocky8-clib-tests-matrix:
needs: [rocky8-clib-standalone-build, changed-files]
permissions:
Expand Down Expand Up @@ -650,6 +668,39 @@
script: "ci/test_java.sh"
artifact-name: "cuvs-java-cuda${{ matrix.CUDA_VER }}"
file_to_upload: "java/cuvs-java/target/"
conda-java-tests-other-arch-matrix:
# All architectures the C++ core builds for, except amd64.
needs: [conda-cpp-build, changed-files]
permissions:
contents: read
uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@release/26.10
if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_java || fromJSON(needs.changed-files.outputs.changed_file_groups).test_cpp
with:
build_type: pull-request
matrix_name: conda-cpp-build
matrix_filter: map(select(.ARCH != "amd64"))
conda-java-tests-other-arch:
# Verifies that the amd64-built cuvs-java jar (jextract-generated Panama bindings and
# all) also works correctly on every non-amd64 architecture, by running its own IT test
# suite against the amd64-built classes without recompiling -- see ci/test_java_prebuilt.sh.
needs: [conda-java-tests-other-arch-matrix, conda-java-build-and-tests]
permissions:
actions: read
contents: read
id-token: write
packages: read
pull-requests: read
secrets: inherit # zizmor: ignore[secrets-inherit]
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.conda-java-tests-other-arch-matrix.outputs.matrix) }}
with:
build_type: pull-request
node_type: "gpu-l4-latest-1"
arch: "${{ matrix.ARCH }}"
container_image: "rapidsai/ci-conda:26.10-cuda${{ matrix.CUDA_VER }}-${{ matrix.LINUX_VER }}-py${{ matrix.PY_VER }}"
script: "ci/test_java_prebuilt.sh ${{ matrix.ARCH }} cuvs-java-cuda${{ matrix.CUDA_VER }}"
conda-lucene-build-and-tests:
# Depends on the Java job for the cuvs-java artifact that cuvs-lucene builds against, and
# reuses its matrix so the two always agree on the set of CUDA versions.
Expand All @@ -675,6 +726,29 @@
script: "ci/test_lucene.sh cuvs-java-cuda${{ matrix.CUDA_VER }}"
artifact-name: "cuvs-lucene-cuda${{ matrix.CUDA_VER }}"
file_to_upload: "java/cuvs-lucene/target/"
conda-lucene-tests-other-arch:
# Verifies that cuvs-lucene, built against the amd64-built cuvs-java jar, also works
# correctly on every non-amd64 architecture, by running its test suite against the
# amd64-built classes without recompiling -- see ci/test_lucene_prebuilt.sh. Reuses
# conda-java-tests-other-arch-matrix so the two always agree on which architectures to test.
needs: [conda-java-tests-other-arch-matrix, conda-java-build-and-tests, conda-lucene-build-and-tests]
permissions:
actions: read
contents: read
id-token: write
packages: read
pull-requests: read
secrets: inherit # zizmor: ignore[secrets-inherit]
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.conda-java-tests-other-arch-matrix.outputs.matrix) }}
with:
build_type: pull-request
node_type: "gpu-l4-latest-1"
arch: "${{ matrix.ARCH }}"
container_image: "rapidsai/ci-conda:26.10-cuda${{ matrix.CUDA_VER }}-${{ matrix.LINUX_VER }}-py${{ matrix.PY_VER }}"
script: "ci/test_lucene_prebuilt.sh ${{ matrix.ARCH }} cuvs-java-cuda${{ matrix.CUDA_VER }} cuvs-lucene-cuda${{ matrix.CUDA_VER }}"
rust-build-matrix:
needs: [conda-cpp-build, changed-files]
permissions:
Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,41 @@
script: "ci/test_java.sh"
artifact-name: "cuvs-java-cuda${{ matrix.CUDA_VER }}"
file_to_upload: "java/cuvs-java/target/"
conda-java-tests-other-arch-matrix:
# All architectures the C++ core builds for, except amd64 -- so a newly added
# architecture is automatically picked up here without a workflow change.
permissions:
contents: read
uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@release/26.10
with:
build_type: ${{ inputs.build_type }}
matrix_name: conda-cpp-build
matrix_filter: map(select(.ARCH != "amd64"))
conda-java-tests-other-arch:
# Verifies that the amd64-built cuvs-java jar (jextract-generated Panama bindings and
# all) also works correctly on every non-amd64 architecture, by running its own IT test
# suite against the amd64-built classes without recompiling -- see ci/test_java_prebuilt.sh.
needs: [conda-java-tests-other-arch-matrix, conda-java-build-and-tests]
permissions:
actions: read
contents: read
id-token: write
packages: read
pull-requests: read
secrets: inherit # zizmor: ignore[secrets-inherit]
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.conda-java-tests-other-arch-matrix.outputs.matrix) }}
with:
build_type: ${{ inputs.build_type }}
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
node_type: "gpu-l4-latest-1"
arch: "${{ matrix.ARCH }}"
container_image: "rapidsai/ci-conda:26.10-cuda${{ matrix.CUDA_VER }}-${{ matrix.LINUX_VER }}-py${{ matrix.PY_VER }}"
script: "ci/test_java_prebuilt.sh ${{ matrix.ARCH }} cuvs-java-cuda${{ matrix.CUDA_VER }}"
conda-lucene-build-and-tests:
# Depends on the Java job for the cuvs-java artifact that cuvs-lucene builds against, and
# reuses its matrix so the two always agree on the set of CUDA versions.
Expand Down Expand Up @@ -132,6 +167,32 @@
script: "ci/test_lucene.sh cuvs-java-cuda${{ matrix.CUDA_VER }}"
artifact-name: "cuvs-lucene-cuda${{ matrix.CUDA_VER }}"
file_to_upload: "java/cuvs-lucene/target/"
conda-lucene-tests-other-arch:
# Verifies that cuvs-lucene, built against the amd64-built cuvs-java jar, also works
# correctly on every non-amd64 architecture, by running its test suite against the
# amd64-built classes without recompiling -- see ci/test_lucene_prebuilt.sh. Reuses
# conda-java-tests-other-arch-matrix so the two always agree on which architectures to test.
needs: [conda-java-tests-other-arch-matrix, conda-java-build-and-tests, conda-lucene-build-and-tests]
permissions:
actions: read
contents: read
id-token: write
packages: read
pull-requests: read
secrets: inherit # zizmor: ignore[secrets-inherit]
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@release/26.10
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.conda-java-tests-other-arch-matrix.outputs.matrix) }}
with:
build_type: ${{ inputs.build_type }}
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
node_type: "gpu-l4-latest-1"
arch: "${{ matrix.ARCH }}"
container_image: "rapidsai/ci-conda:26.10-cuda${{ matrix.CUDA_VER }}-${{ matrix.LINUX_VER }}-py${{ matrix.PY_VER }}"
script: "ci/test_lucene_prebuilt.sh ${{ matrix.ARCH }} cuvs-java-cuda${{ matrix.CUDA_VER }} cuvs-lucene-cuda${{ matrix.CUDA_VER }}"
wheel-tests-cuvs:
permissions:
actions: read
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ dist/
python/**/**/*.cpp
python/cuvs/record.txt
log
infrequent_licenses/
.ipynb_checkpoints
.DS_Store
dask-worker-space/
Expand All @@ -29,6 +30,7 @@ temporary_*.json
rust/target/
rust/Cargo.lock
rmm_log.txt
*.tar.gz

## example notebooks
notebooks/simplewiki-2020-11-01-nq-distilbert-base-v1.pt
Expand Down
23 changes: 23 additions & 0 deletions Dockerfile.standalone
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Environment and runner for the standalone C build.
#
# End-user instructions: https://docs.nvidia.com/cuvs/installation#build-the-standalone-c-library-with-docker

ARG CUDA_VERSION=notset
ARG PYTHON_VERSION=notset
ARG RAPIDS_VERSION=notset
FROM rapidsai/ci-wheel:${RAPIDS_VERSION}-cuda${CUDA_VERSION}-rockylinux8-py${PYTHON_VERSION}

# Output directory for the standalone archive. Bind-mount a host folder here
# (e.g. -v $(pwd)/build:/build) so libcuvs_c.tar.gz is written to the host.
ENV CUVS_TARBALL_BUILD_OUTPUT_DIR=/build
ENV CUVS_TARBALL_IN_CONTAINER=1

# Run from repo root; the repo is expected to be bind-mounted at /workspace.
WORKDIR /workspace

# Run the build script, which writes the standalone tarball to the mounted output dir.
# Example: docker run -v $(pwd):/workspace -v $(pwd)/build:/build cuvs-standalone-c [--tarball-build-tests]
ENTRYPOINT ["/bin/bash", "-c", "ci/standalone_c/build_standalone_c.sh \"$@\"", "--"]
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ cuVS comes with pre-built packages that can be installed through [conda](https:/

Please see the [Build and Install Guide](https://docs.rapids.ai/api/cuvs/nightly/build/) for more information on installing the available cuVS packages and building from source.

### Standalone C library (Docker)

To build the standalone C library tarball (`libcuvs_c.tar.gz`) for use in your own C/C++ projects, see **[Building the standalone C library with Docker](https://docs.nvidia.com/cuvs/installation#build-the-standalone-c-library-with-docker)**.

## Getting Started

The following code snippets train an approximate nearest neighbors index for the CAGRA algorithm in the various different languages supported by cuVS.
Expand Down
Loading
Loading