Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
cf2a293
feat(libcucim): port libcucim conda-build to rattler-build
gforsyth Apr 1, 2025
a2efae2
refactor(cucim): update license in cucim
gforsyth Apr 3, 2025
43276d0
refactor(libcucim): prefix_detection and overlinking checks
gforsyth Apr 3, 2025
64e1958
refactor(cucim): port from conda-build to rattler-build
gforsyth Apr 3, 2025
50f9cee
ci: switch to `rattler-build`
gforsyth Apr 3, 2025
53b2c0f
chore(conda): remove conda-build meta.yaml and scripts
gforsyth Apr 3, 2025
ffee1f2
fix(libcucim): comment out changes to LD_LIBRARY_PATH
gforsyth Apr 3, 2025
9410b83
refactor: add `make` to both recipes
gforsyth Apr 3, 2025
7c73eb5
fix(cuda11): add `cudatoolkit` to `host`
gforsyth Apr 3, 2025
7ab3a96
Merge branch 'branch-25.06' into rattler-build
gforsyth Apr 15, 2025
321d286
refactor: use strict channel priority
gforsyth Apr 15, 2025
b793065
chore(libcucim): add binutils to build
gforsyth Apr 16, 2025
049e746
Merge branch 'branch-25.08' into rattler-build
gforsyth May 27, 2025
9fc5d97
Merge branch 'branch-25.08' into rattler-build
gforsyth Jul 1, 2025
aac3a75
chore: update `libcucim` rattler recipe
gforsyth Jul 1, 2025
1431e1f
chore: update `cucim` rattler recipe
gforsyth Jul 1, 2025
7d5dcd3
chore: remove conda-build recipe and scripts
gforsyth Jul 1, 2025
8b9d4db
fix: misplaced quotation mark
gforsyth Jul 2, 2025
5d581e4
Merge branch 'branch-25.10' into rattler-build
jakirkham Jul 31, 2025
de9a29f
Merge rapidsai/branch-25.10 into gforsyth/rattler-build
jakirkham Aug 5, 2025
8412581
Merge rapidsai/branch-25.10 into gforsyth/rattler-build
jakirkham Aug 22, 2025
ce8939b
Merge rapidsai/branch-25.10 into gforsyth/rattler-build
jakirkham Sep 18, 2025
da1b9f9
Merge rapidsai/main into gforsyth/rattler-build
jakirkham Jun 25, 2026
15422e9
Merge branch 'main' into rattler-build
jakirkham Jun 25, 2026
71802ee
Drop unneeded `CPP_CHANNEL`
jakirkham Jun 25, 2026
ef5a9fb
Drop leftover copy-pasta
jakirkham Jun 25, 2026
dec1858
Fix nvimgcodec version constraint syntax
jakirkham Jun 26, 2026
d8ed094
Set RAPIDS package version in Python build
jakirkham Jun 27, 2026
4fd8c8f
Enable experimental for rattler-build
jakirkham Jun 27, 2026
98a044f
Drop extra `--experimental` from `rattler-build`
jakirkham Jun 27, 2026
1c78cd6
Readd channels for rattler-build & cached C++ pkgs
jakirkham Jun 27, 2026
9f41309
Set `RAPIDS_PACKAGE_VERSION` and use it
jakirkham Jun 27, 2026
d6d16e4
Readd sccache bits for C++ build
jakirkham Jun 27, 2026
0ac6c68
Write to VERSION file in C++ build
jakirkham Jun 27, 2026
4c156e3
Readd xorg workaround for clobbering (warn)
jakirkham Jun 27, 2026
19f14b7
Reconsolidate `sccache` steps in Python build
jakirkham Jun 27, 2026
5313a03
Log before building `libcucim`
jakirkham Jun 27, 2026
5448cf7
Consolidate rattler-build channel config
jakirkham Jun 27, 2026
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
24 changes: 18 additions & 6 deletions ci/build_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

set -euo pipefail

./ci/rapids-configure-conda-channels

source rapids-configure-sccache

source rapids-date-string
Expand All @@ -28,10 +26,24 @@ sccache --start-server
# ref: https://github.com/rapidsai/cucim/issues/800#issuecomment-2529593457
conda config --set path_conflict warn

RAPIDS_PACKAGE_VERSION=$(rapids-generate-version) rapids-conda-retry build \
conda/recipes/libcucim
RAPIDS_PACKAGE_VERSION=$(rapids-generate-version)
export RAPIDS_PACKAGE_VERSION
echo "${RAPIDS_PACKAGE_VERSION}" > ./VERSION

# populates `RATTLER_CHANNELS` array and `RATTLER_ARGS` array
source rapids-rattler-channel-string

rapids-logger "Building libcucim"

# --no-build-id allows for caching with `sccache`
# more info is available at
# https://rattler.build/latest/tips_and_tricks/#using-sccache-or-ccache-with-rattler-build
rattler-build build --recipe conda/recipes/libcucim \
"${RATTLER_ARGS[@]}" \
"${RATTLER_CHANNELS[@]}"

sccache --show-adv-stats

RAPIDS_PACKAGE_NAME="$(rapids-artifact-name conda_cpp libcucim cucim --cuda "$RAPIDS_CUDA_VERSION")"
export RAPIDS_PACKAGE_NAME
# remove build_cache directory to avoid uploading the entire source tree
# tracked in https://github.com/prefix-dev/rattler-build/issues/1424
rm -rf "$RAPIDS_CONDA_BLD_OUTPUT_DIR"/build_cache
31 changes: 21 additions & 10 deletions ci/build_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

set -euo pipefail

./ci/rapids-configure-conda-channels

source rapids-configure-sccache

source rapids-date-string
Expand All @@ -14,7 +12,9 @@ export CMAKE_GENERATOR=Ninja

rapids-print-env

rapids-generate-version > ./VERSION
RAPIDS_PACKAGE_VERSION="$(rapids-generate-version)"
export RAPIDS_PACKAGE_VERSION
echo "${RAPIDS_PACKAGE_VERSION}" > ./VERSION

rapids-logger "Begin py build"

Expand All @@ -30,14 +30,25 @@ sccache --start-server
# ref: https://github.com/rapidsai/cucim/issues/800#issuecomment-2529593457
conda config --set path_conflict warn

CPP_CHANNEL=$(rapids-download-from-github "$(rapids-artifact-name conda_cpp libcucim cucim --cuda "$RAPIDS_CUDA_VERSION")")
# populates `RATTLER_CHANNELS` array and `RATTLER_ARGS` array
source rapids-rattler-channel-string

# TODO: Remove `--no-test` flag once importing on a CPU
# node works correctly
RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION) rapids-conda-retry build \
--no-test \
--channel "${CPP_CHANNEL}" \
conda/recipes/cucim
# Add C++ cached packages to rattler-build's channels
CPP_CHANNEL=$(rapids-download-from-github "$(rapids-artifact-name conda_cpp libcucim cucim --cuda "$RAPIDS_CUDA_VERSION")")
rapids-logger "Prepending channel ${CPP_CHANNEL} to RATTLER_CHANNELS"
RATTLER_CHANNELS=("--channel" "${CPP_CHANNEL}" "${RATTLER_CHANNELS[@]}")

rapids-logger "Building cucim"

# TODO: remove `--test skip` when importing on a CPU node works correctly
# --no-build-id allows for caching with `sccache`
# more info is available at
# https://rattler.build/latest/tips_and_tricks/#using-sccache-or-ccache-with-rattler-build
rattler-build build --recipe conda/recipes/cucim \
--experimental \
--test skip \
"${RATTLER_ARGS[@]}" \
"${RATTLER_CHANNELS[@]}"

sccache --show-adv-stats

Expand Down
34 changes: 0 additions & 34 deletions ci/rapids-configure-conda-channels

This file was deleted.

28 changes: 0 additions & 28 deletions conda/recipes/cucim/build.sh

This file was deleted.

93 changes: 0 additions & 93 deletions conda/recipes/cucim/meta.yaml

This file was deleted.

120 changes: 120 additions & 0 deletions conda/recipes/cucim/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION.
# SPDX-License-Identifier: Apache-2.0

schema_version: 1

context:
version: ${{ env.get("RAPIDS_PACKAGE_VERSION") }}
minor_version: ${{ (version | split("."))[:2] | join(".") }}
cuda_version: ${{ (env.get("RAPIDS_CUDA_VERSION") | split("."))[:2] | join(".") }}
cuda_major: '${{ (env.get("RAPIDS_CUDA_VERSION") | split("."))[0] }}'
date_string: '${{ env.get("RAPIDS_DATE_STRING") }}'
py_version: ${{ env.get("RAPIDS_PY_VERSION") }}
py_buildstring: ${{ py_version | version_to_buildstring }}
head_rev: ${{ git.head_rev(".")[:8] }}
linux64: ${{ linux and x86_64 }}

package:
name: cucim
version: ${{ version }}

source:
path: ../../..

build:
string: cuda${{ cuda_major }}_py${{ py_buildstring }}_${{ date_string }}_gh${{ head_rev }}_h${{ hash }}
dynamic_linking:
overlinking_behavior: error
prefix_detection:
ignore:
- lib/libcucim.so
- lib/libcucim.so.*
- lib/cucim.*.so
script:
content: |
CUCIM_BUILD_TYPE=${CUCIM_BUILD_TYPE:-release}
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:-}

set -euo pipefail

# CUDA needs to include $PREFIX/include as system include path
export CUDAFLAGS="-isystem $BUILD_PREFIX/include -isystem $PREFIX/include "
export LD_LIBRARY_PATH="$BUILD_PREFIX/lib:$PREFIX/lib:$LD_LIBRARY_PATH"

./run build_local cucim "${CUCIM_BUILD_TYPE}"

cp -P python/install/lib/* python/cucim/src/cucim/clara/

pushd python/cucim

python -m pip install --config-settings rapidsai.disable-cuda=true . -vv

popd
secrets:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_SESSION_TOKEN
env:
CMAKE_C_COMPILER_LAUNCHER: ${{ env.get("CMAKE_C_COMPILER_LAUNCHER") }}
CMAKE_CUDA_COMPILER_LAUNCHER: ${{ env.get("CMAKE_CUDA_COMPILER_LAUNCHER") }}
CMAKE_CXX_COMPILER_LAUNCHER: ${{ env.get("CMAKE_CXX_COMPILER_LAUNCHER") }}
CMAKE_GENERATOR: ${{ env.get("CMAKE_GENERATOR") }}
SCCACHE_BUCKET: ${{ env.get("SCCACHE_BUCKET") }}
SCCACHE_IDLE_TIMEOUT: ${{ env.get("SCCACHE_IDLE_TIMEOUT") }}
SCCACHE_REGION: ${{ env.get("SCCACHE_REGION") }}
SCCACHE_S3_USE_SSL: ${{ env.get("SCCACHE_S3_USE_SSL") }}
SCCACHE_S3_NO_CREDENTIALS: ${{ env.get("SCCACHE_S3_NO_CREDENTIALS") }}
SCCACHE_S3_KEY_PREFIX: cucim/${{ env.get("RAPIDS_CONDA_ARCH") }}/cuda${{ cuda_major }}

requirements:
build:
- ${{ compiler("c") }}
- ${{ compiler("cuda") }}
- ${{ compiler("cxx") }}
- ${{ stdlib("c") }}
- cmake ${{ cmake_version }}
- cuda-version =${{ cuda_version }}
- make
- ninja
host:
- click
- cuda-cudart-dev
- cuda-version =${{ cuda_version }}
- cupy >=13.6.0,!=14.0.0,!=14.1.0
- libcucim =${{ version }}
- pip
- python =${{ py_version }}
- python-gil
- rapids-build-backend >=0.4.0,<0.5.0.dev0
- scikit-image >=0.23.2,<0.27.0a0
- scipy >=1.6
- setuptools >=80.9.0
run:
- ${{ pin_compatible("cuda-version", upper_bound="x", lower_bound="x") }}
- click
- cuda-cudart
- cupy >=13.6.0,!=14.0.0,!=14.1.0
- lazy_loader >=0.1
- libcucim =${{ version }}
- numpy >=1.23,<3.0a0
- python
- python-gil
- scikit-image >=0.23.2,<0.27.0a0
- scipy >=1.6
run_constraints:
- openslide-python >=1.3.0
ignore_run_exports:
by_name:
- cuda-cudart
- cuda-version

tests:
- python:
imports:
- cucim
pip_check: False

about:
homepage: ${{ load_from_file("python/cucim/pyproject.toml").project.urls.Homepage }}
license: ${{ load_from_file("python/cucim/pyproject.toml").project.license.text }}
summary: ${{ load_from_file("python/cucim/pyproject.toml").project.description }}
Loading
Loading