Containerize standalone tarball build - #2595
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/26.10 #2595 +/- ##
==============================================
Coverage 86.93% 86.93%
==============================================
Files 33 33
Lines 176 176
==============================================
Hits 153 153
Misses 23 23 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
/ok to test |
| uses: rapidsai/shared-workflows/.github/workflows/compute-matrix.yaml@release/26.10 | ||
| with: | ||
| build_type: pull-request | ||
| build_type: ${{ inputs.build_type || 'branch' }} |
There was a problem hiding this comment.
This looks like a copy-past mistake. Not a big deal since this is based on conda-cpp-build and those are the same for PRs and branch/nightly builds, but should fix this anyway for consistency.
| artifact-name: "libcuvs_c_${{ matrix.CUDA_VER }}_${{ matrix.ARCH }}.tar.gz" | ||
| file_to_upload: "libcuvs_c.tar.gz" | ||
| sha: ${{ inputs.sha }} | ||
| steps: |
There was a problem hiding this comment.
I think @cjnolet originally pulled all these steps from custom-job.yaml out here individually because this script ends up running a docker run and custom-job.yaml requires running in a container.
Maybe this could be made to work with a docker-in-docker approach or making the container image optional for custom-job.yaml but IMO that doesn't need to become part of the scope here. I think this inlining is ok for right now.
| 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 |
There was a problem hiding this comment.
Notice that this PR doesn't have a git clone of spdx-license-builder like custom-job.yaml does when this input is provided.
Instead, build_standalone_c.sh now does this:
pip install 'git+https://github.com/rapidsai/spdx-license-builder.git'I like that, it keeps things self-contained in the container (ha!). It'd be annoying to do an outside clone and thread it through to the container in a way that's also easy to replicate locally.
| RAPIDS_PACKAGE_VERSION=$(rapids-generate-version) | ||
| export RAPIDS_PACKAGE_VERSION | ||
|
|
||
| RAPIDS_ARTIFACTS_DIR=${RAPIDS_ARTIFACTS_DIR:-"${PWD}/artifacts"} | ||
| mkdir -p "${RAPIDS_ARTIFACTS_DIR}" | ||
| export RAPIDS_ARTIFACTS_DIR | ||
|
|
There was a problem hiding this comment.
This looks copied over from conda build scripts. None of this stuff is needed for building the tarball.
|
|
||
| ```bash | ||
| # (optional) clean old build directories | ||
| rm -rf ./{build,c/build/,cpp/build} |
There was a problem hiding this comment.
I hit enough weird errors in repeated testing that I think this is worth calling out specifically.
If you think it's excessive and just a standard thing people should know, fine to remove it.
| --env-file <(env | grep -E '^AWS_(ACCESS_KEY_ID|SECRET_ACCESS_KEY|SESSION_TOKEN)=') \ | ||
| --env-file <(env | grep -E '^SCCACHE_.*=') \ |
There was a problem hiding this comment.
As the comment I wrote a few lines up here say... this --env-file trick keeps these sensitive values out of command history and ps types of output.
These lines are primarily here for CI.
AWS_*forsccacheSCCACHE_*forsccache-dist(the build cluster)
I confirmed in the logs that sccache is working well, haven't confirmed that the build cluster's being used. Might not be because I'd already done some runs and we might get 100% cache hit rates until something changes and requires a recompile.
right now I see:
...
Cache hits rate 100.00 %
Cache hits rate (c [gcc]) 100.00 %
Cache hits rate (c++ [gcc]) 100.00 %
Cache hits rate (cuda [nvcc]) 100.00 %
...
msarahan
left a comment
There was a problem hiding this comment.
Good improvements. Thanks for the work here, James.
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:
Changes relative to that PR:
PARALLEL_LEVELthrought so builds are parallelizedsccache-dist) in CIsccachemore securegit cloneof https://github.com/rapidsai/spdx-license-buildersccachein CI and with a pattern that could work locally (will share details privately)Notes for Reviewers
How I tested this
Locally tried each of the new commands added to
build.md, withsccacheenabled.Tried just
build.shwithoutsccacheenabled (that takes a lot longer to run).code for flipping between those (click me)
Saw high cache hit rates from
sccacheand 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.