You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replaces #2443
Containerizes the process of building the standalone C library tarballs
The starting point for this PR is @cjnolet 's work in #2443, where he wrote this description:
> _This PR is based on @msarahan's original POC, with the logic of the ci sript moved into build.sh and invoked through the CI script. The readme is also moved into the build and install guide in the docs._
Changes relative to that PR:
* threads `PARALLEL_LEVEL` throught so builds are parallelized
* enables the build cluster (`sccache-dist`) in CI
* simplifies configuration flow (e.g. reduced duplication of default values, removal of unnecessary flexibility)
* makes flow of AWS creds for `sccache` more secure
* removes unnecessary configuration
* removes unnecessary package installs, consolidates package installs
* removes an unnecessary `git clone` of https://github.com/rapidsai/spdx-license-builder
* enables `sccache` in CI and with a pattern that could work locally (will share details privately)
* updates GitHub Actions third-party actions to their latest versions
## Notes for Reviewers
### How I tested this
Locally tried each of the new commands added to `build.md`, with `sccache` enabled.
Tried just `build.sh` without `sccache` enabled (that takes a lot longer to run).
<details><summary>code for flipping between those (click me)</summary>
```shell
# enabling sccache
export CI=true
# (private steps setting up 'sccache' profile)
AWS_ACCESS_KEY_ID=$(
aws configure get aws_access_key_id \
--profile sccache
)
AWS_SECRET_ACCESS_KEY=$(
aws configure get aws_secret_access_key \
--profile sccache
)
AWS_SESSION_TOKEN=$(
aws configure get aws_session_token \
--profile sccache
)
export AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN
# testing without 'sccache'
unset AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN CI
```
</details>
```shell
clean() {
sudo rm -rf ./{build,c/build/,cpp/build,libcuvs_c.tar.gz}
}
# all defaults
clean
./build.sh tarball
# customizing base image
clean
CUVS_TARBALL_CUDA_VERSION=12.9.2 \
CUVS_TARBALL_PYTHON_VERSION=3.11 \
./build.sh tarball
# customizing output directory, building tests
clean
CUVS_TARBALL_BUILD_OUTPUT_DIR="${PWD}/dist" ./build.sh tarball --tarball-build-tests
# manual run (no build.sh)
clean
docker build \
-f Dockerfile.standalone \
--build-arg CUDA_VERSION="13.3.0" \
--build-arg PYTHON_VERSION="3.14" \
--build-arg RAPIDS_VERSION="$(head -1 ./VERSION | cut -d. -f1,2 )" \
-t cuvs-standalone-c:local \
.
mkdir -p "${PWD}/dist"
docker run --rm \
-v "${PWD}:/workspace" \
-v "${PWD}/dist:/build" \
cuvs-standalone-c:local --tarball-build-tests
```
Saw high cache hit rates from `sccache` and everything working as expected.
Also looked at CI logs and saw that fully-cached jobs take around 30 minutes, pretty similar to the timings in CI today.
Authors:
- James Lamb (https://github.com/jameslamb)
Approvers:
- Mike Sarahan (https://github.com/msarahan)
- Corey J. Nolet (https://github.com/cjnolet)
URL: #2595
Copy file name to clipboardExpand all lines: README.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,6 +84,10 @@ cuVS comes with pre-built packages that can be installed through [conda](https:/
84
84
85
85
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.
86
86
87
+
### Standalone C library (Docker)
88
+
89
+
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)**.
90
+
87
91
## Getting Started
88
92
89
93
The following code snippets train an approximate nearest neighbors index for the CAGRA algorithm in the various different languages supported by cuVS.
0 commit comments