Portable standalone tarball build with Docker - #2443
Conversation
b61beb0 to
3b6132c
Compare
|
/ok to test 0743a95 |
|
/ok to test 05fbbfe |
|
/ok to test 472089c |
|
/ok to test 266bd65 |
|
/ok to test 04c2e2b |
|
/ok to test a0e7f83 |
|
/ok to test fabdd4f |
|
/ok to test 30041f5 |
|
/ok to test c048d87 |
|
/ok to test 4430d5e |
1 similar comment
|
/ok to test 4430d5e |
jameslamb
left a comment
There was a problem hiding this comment.
Spent some time with this today. In general, I think it'd benefit from a pass for strictness... I feel that the current state has a lot of unnecessary flexibility and indirection. "a lot" = "so much that it makes it hard to understand the flow of configuration"
After that, it's worth trying out the commands in the docs again (I tried and a few failed).
I tested like this:
$ CUDA_VERSION=12.9.2 PYTHON_VERSION=3.11 ./build.sh tarballThat succeeded and produced a tarball. Its layout looks right to me, assuming that it's expected that the SOVERSION is 1.4 (libcuvs_c.so.1.4).
tarball contents (click me)
$ tar -tvf ./libcuvs_c.tar.gz
drwxr-xr-x root/root 0 2026-08-14 15:52 ./
drwxr-xr-x root/root 0 2026-08-14 15:52 ./lib64/
lrwxrwxrwx root/root 0 2026-08-14 15:52 ./lib64/libcuvs_c.so.1 -> libcuvs_c.so.1.4
lrwxrwxrwx root/root 0 2026-08-14 15:52 ./lib64/libcuvs_c.so -> libcuvs_c.so.1
drwxr-xr-x root/root 0 2026-08-14 15:52 ./lib64/cmake/
drwxr-xr-x root/root 0 2026-08-14 15:52 ./lib64/cmake/cuvs/
-rw-r--r-- root/root 835 2026-08-14 15:52 ./lib64/cmake/cuvs/cuvs-c_api-c-targets-release.cmake
-rw-r--r-- root/root 3681 2026-08-14 15:52 ./lib64/cmake/cuvs/cuvs-config-version.cmake
-rw-r--r-- root/root 7309 2026-08-14 15:52 ./lib64/cmake/cuvs/cuvs-config.cmake
-rw-r--r-- root/root 766 2026-08-14 15:52 ./lib64/cmake/cuvs/cuvs-dependencies.cmake
-rw-r--r-- root/root 4036 2026-08-14 15:52 ./lib64/cmake/cuvs/cuvs-targets.cmake
-rw-r--r-- root/root 4264 2026-08-14 15:52 ./lib64/cmake/cuvs/cuvs-c_api-c-targets.cmake
-rwxr-xr-x root/root 392490568 2026-08-14 15:52 ./lib64/libcuvs_c.so.1.4
drwxr-xr-x root/root 0 2026-08-14 15:52 ./include/
drwxr-xr-x root/root 0 2026-08-14 15:52 ./include/cuvs/
drwxr-xr-x root/root 0 2026-08-14 15:52 ./include/cuvs/preprocessing/
-rw-r--r-- root/root 8918 2026-07-10 10:06 ./include/cuvs/preprocessing/pca.h
drwxr-xr-x root/root 0 2026-08-14 15:52 ./include/cuvs/preprocessing/quantize/
-rw-r--r-- root/root 7525 2026-05-15 15:03 ./include/cuvs/preprocessing/quantize/pq.h
-rw-r--r-- root/root 3752 2026-05-15 15:03 ./include/cuvs/preprocessing/quantize/scalar.h
-rw-r--r-- root/root 4428 2026-05-15 15:03 ./include/cuvs/preprocessing/quantize/binary.h
drwxr-xr-x root/root 0 2026-08-14 15:52 ./include/cuvs/distance/
-rw-r--r-- root/root 1585 2026-05-15 15:03 ./include/cuvs/distance/pairwise_distance.h
-rw-r--r-- root/root 1593 2026-05-15 15:03 ./include/cuvs/distance/distance.h
drwxr-xr-x root/root 0 2026-08-14 15:52 ./include/cuvs/cluster/
-rw-r--r-- root/root 7687 2026-08-03 15:21 ./include/cuvs/cluster/kmeans.h
-rw-r--r-- root/root 2265 2026-08-03 15:21 ./include/cuvs/cluster/mg_kmeans.h
drwxr-xr-x root/root 0 2026-08-14 15:52 ./include/cuvs/neighbors/
-rw-r--r-- root/root 7403 2026-05-15 15:03 ./include/cuvs/neighbors/mg_ivf_pq.h
-rw-r--r-- root/root 1754 2026-05-15 15:03 ./include/cuvs/neighbors/refine.h
-rw-r--r-- root/root 19917 2026-05-15 15:03 ./include/cuvs/neighbors/hnsw.h
-rw-r--r-- root/root 1648 2026-08-03 15:21 ./include/cuvs/neighbors/common.h
-rw-r--r-- root/root 8057 2026-05-15 15:03 ./include/cuvs/neighbors/tiered_index.h
-rw-r--r-- root/root 7265 2026-05-15 15:03 ./include/cuvs/neighbors/nn_descent.h
-rw-r--r-- root/root 40535 2026-08-03 15:21 ./include/cuvs/neighbors/cagra.h
-rw-r--r-- root/root 11124 2026-05-29 16:18 ./include/cuvs/neighbors/ivf_sq.h
-rw-r--r-- root/root 5146 2026-08-03 15:21 ./include/cuvs/neighbors/all_neighbors.h
-rw-r--r-- root/root 12520 2026-05-15 15:03 ./include/cuvs/neighbors/ivf_flat.h
-rw-r--r-- root/root 1274 2026-05-15 15:03 ./include/cuvs/neighbors/mg_common.h
-rw-r--r-- root/root 23817 2026-05-15 15:03 ./include/cuvs/neighbors/ivf_pq.h
-rw-r--r-- root/root 7104 2026-05-15 15:03 ./include/cuvs/neighbors/brute_force.h
-rw-r--r-- root/root 6389 2026-05-15 15:03 ./include/cuvs/neighbors/vamana.h
-rw-r--r-- root/root 8066 2026-08-03 15:21 ./include/cuvs/neighbors/mg_cagra.h
-rw-r--r-- root/root 7611 2026-05-15 15:03 ./include/cuvs/neighbors/mg_ivf_flat.h
drwxr-xr-x root/root 0 2026-08-14 15:52 ./include/cuvs/selection/
-rw-r--r-- root/root 1267 2026-08-03 15:21 ./include/cuvs/selection/select_k.h
drwxr-xr-x root/root 0 2026-08-14 15:52 ./include/cuvs/core/
-rw-r--r-- root/root 3813 2026-08-03 15:21 ./include/cuvs/core/dataset.h
-rw-r--r-- root/root 635 2026-05-15 15:03 ./include/cuvs/core/export.h
-rw-r--r-- root/root 1424 2026-08-03 15:21 ./include/cuvs/core/all.h
-rw-r--r-- root/root 167 2026-08-14 15:52 ./include/cuvs/core/c_config.h
-rw-r--r-- root/root 11809 2026-08-03 15:21 ./include/cuvs/core/c_api.h
-rw-r--r-- root/root 3164590 2026-08-14 15:52 ./licenses.json
-rw-r--r-- root/root 61212 2026-08-14 15:52 ./LICENSEI'd be happy to review again and to look more closely at the CI side of this once my suggestions have been addressed.
| }, | ||
| "cacheFrom": [ | ||
| "ghcr.io/rapidsai/cuvs/devcontainer:26.08-cuda12.9-conda" | ||
| "ghcr.io/rapidsai/cuvs/devcontainer:26.10-cuda12.9-conda" |
There was a problem hiding this comment.
These references being there on main means ci/release/update-version.sh is missing some update rules. I'll put up a separate PR for that, and then these files can drop out out of the diff.
There was a problem hiding this comment.
Thank you. yeah I happened to notice them as i was looking through the branch so figured I'd make the changes here too.
| ARG CUDA_VERSION=13.0 | ||
| ARG PYTHON_VERSION=3.11 |
There was a problem hiding this comment.
| ARG CUDA_VERSION=13.0 | |
| ARG PYTHON_VERSION=3.11 | |
| ARG CUDA_VERSION=notset | |
| ARG PYTHON_VERSION=notset |
Recommend not using real values here. This way, we'll get a big loud error if scripts accidentally forget to pass values for these (instead of just silently falling back to a wrong version).
| "${REPODIR}" | ||
|
|
||
| DOCKER_ENV=() | ||
| for var in ${CUVS_TARBALL_DOCKER_ENV_VARS:-}; do |
There was a problem hiding this comment.
What's the purpose of doing this loop over a space-delimited list of environment variables?
In my opinion it'd be simpler and clearer to just have the docker run below directly read exactly what it needs from the environment, like this:
docker run --rm \
-v "${REPODIR}:/workspace" \
-v "${BUILD_OUTPUT_DIR_ABS}:/build" \
--env AWS_REGION="${AWS_REGION}" \
--env AWS_ACCESS_KEY_ID="${AWS_ACCESS_KEY_ID}"`
# ... etc., etc.I recommend doing that. Right now I don't see what we're gaining in exchange for all this indirection.
| To select CUDA and Python versions, set environment variables to values that match a valid [`rapidsai/ci-wheel` image tag](https://hub.docker.com/r/rapidsai/ci-wheel/tags): | ||
|
|
||
| ```bash | ||
| CUDA_VERSION=12.9 PYTHON_VERSION=3.11 ./build.sh tarball |
There was a problem hiding this comment.
Did these commands work for you?
I pulled your branch and tested, this failed immediately for me.
$ CUDA_VERSION=12.9 PYTHON_VERSION=3.11 ./build.sh tarball
[+] Building 0.7s (2/2) FINISHED docker:default
=> [internal] load build definition from Dockerfile.standalone 0.0s
=> => transferring dockerfile: 2.42kB 0.0s
=> ERROR [internal] load metadata for docker.io/rapidsai/ci-wheel:26.10-cuda12.9-rockylinux8-py3.11 0.5s
------
> [internal] load metadata for docker.io/rapidsai/ci-wheel:26.10-cuda12.9-rockylinux8-py3.11:
------
Dockerfile.standalone:12
--------------------
10 | ARG CUDA_VERSION=13.0
11 | ARG PYTHON_VERSION=3.11
12 | >>> FROM rapidsai/ci-wheel:26.10-cuda${CUDA_VERSION}-rockylinux8-py${PYTHON_VERSION}
13 |
14 | ARG NINJA_VERSION=v1.13.1
--------------------
ERROR: failed to build: failed to solve: rapidsai/ci-wheel:26.10-cuda12.9-rockylinux8-py3.11: failed to resolve source metadata for docker.io/rapidsai/ci-wheel:26.10-cuda12.9-rockylinux8-py3.11: docker.io/rapidsai/ci-wheel:26.10-cuda12.9-rockylinux8-py3.11: not foundMakes sense... we don't publish an image named that way. If you look at https://hub.docker.com/r/rapidsai/ci-wheel/tags?name=26.10-cuda12, you'll see that the tags for rapidsai/ci-wheel us a 3-part version for CUDA, so 12.9.2 not 12.9.
Saw similar errors in other commands documented on this page, like:
./build.sh tarball --tarball-build-testsRunning with a corrected version like this succeeded (took about 20 minutes without sccache):
$ CUDA_VERSION=12.9.2 PYTHON_VERSION=3.11 ./build.sh tarball
...
Machine-friendly JSON output written to: c/build/install/licenses.json
Fetching license Apache-2.0 from SPDX API...
Cached license Apache-2.0 to /workspace/infrequent_licenses/Apache-2.0.txt
User-friendly text output written to: c/build/install/LICENSE
RAPIDS logger » [08/14/26 20:52:53]
┌────────────────────────────────┐
| Begin c tarball creation |
└────────────────────────────────┘
-rw-r--r-- 1 root root 255M Aug 14 20:53 /build/libcuvs_c.tar.gz
'/home/jlamb/repos/cuvs/build/libcuvs_c.tar.gz' -> '/home/jlamb/repos/cuvs/libcuvs_c.tar.gz'
Copied libcuvs_c.tar.gz to /home/jlamb/repos/cuvs/libcuvs_c.tar.gzIt'd be helpful to test all of these commands locally before the next round of commits is pushed here.
|
Oh one other thing... after running locally, these files are untracked: $ git status
infrequent_licenses/
libcuvs_c.tar.gzI think it'd be worthwhile to add |
Co-authored-by: James Lamb <jaylamb20@gmail.com>
Co-authored-by: James Lamb <jaylamb20@gmail.com>
Co-authored-by: James Lamb <jaylamb20@gmail.com>
Co-authored-by: James Lamb <jaylamb20@gmail.com>
Co-authored-by: James Lamb <jaylamb20@gmail.com>
Co-authored-by: James Lamb <jaylamb20@gmail.com>
Co-authored-by: James Lamb <jaylamb20@gmail.com>
Co-authored-by: James Lamb <jaylamb20@gmail.com>
Co-authored-by: James Lamb <jaylamb20@gmail.com>
Co-authored-by: James Lamb <jaylamb20@gmail.com>
|
/ok to test 1ba4f83 |
1 similar comment
|
/ok to test 1ba4f83 |
|
/ok to testr f812e92 |
This PR is based on @msarahan's original POC, with the logic of the ci sript moved into
build.shand invoked through the CI script. The readme is also moved into the build and install guide in the docs.