Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 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
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
25 changes: 16 additions & 9 deletions ci/build_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

set -euo pipefail

./ci/rapids-configure-conda-channels

source rapids-configure-sccache

source rapids-date-string
Expand All @@ -15,12 +13,13 @@ rapids-print-env

rapids-logger "Begin cpp build"

# this can be set back to 'prevent' once the xorg-* migrations are completed
# ref: https://github.com/rapidsai/cucim/issues/800#issuecomment-2529593457
conda config --set path_conflict warn

sccache --zero-stats

RAPIDS_PACKAGE_VERSION=$(rapids-generate-version)
export RAPIDS_PACKAGE_VERSION

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

# TODO: Remove when CUDA 12.1 is dropped.
# In most cases, the CTK has cuFile.
Expand All @@ -42,8 +41,16 @@ echo 'Contents of `extra_variants.yaml`:'
cat extra_variants.yaml
echo ''

RAPIDS_PACKAGE_VERSION=$(rapids-generate-version) rapids-conda-retry build \
-m extra_variants.yaml \
conda/recipes/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 \
--variant-config extra_variants.yaml \
"${RATTLER_ARGS[@]}" \
"${RATTLER_CHANNELS[@]}"

sccache --show-adv-stats

# 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
36 changes: 23 additions & 13 deletions ci/build_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

set -euo pipefail

./ci/rapids-configure-conda-channels

source rapids-configure-sccache

source rapids-date-string
Expand All @@ -15,21 +13,33 @@ rapids-print-env

rapids-generate-version > ./VERSION

rapids-logger "Begin py build"

# this can be set back to 'prevent' once the xorg-* migrations are completed
# ref: https://github.com/rapidsai/cucim/issues/800#issuecomment-2529593457
conda config --set path_conflict warn
RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION)
export RAPIDS_PACKAGE_VERSION

CPP_CHANNEL=$(rapids-download-conda-from-github cpp)

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

rapids-logger "Prepending channel ${CPP_CHANNEL} to RATTLER_CHANNELS"

RATTLER_CHANNELS=("--channel" "${CPP_CHANNEL}" "${RATTLER_CHANNELS[@]}")

sccache --zero-stats

# 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
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 \
--test skip \
"${RATTLER_ARGS[@]}" \
"${RATTLER_CHANNELS[@]}"

sccache --show-adv-stats

# 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
34 changes: 0 additions & 34 deletions ci/rapids-configure-conda-channels

This file was deleted.

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

This file was deleted.

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

This file was deleted.

116 changes: 116 additions & 0 deletions conda/recipes/cucim/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# Copyright (c) 2025, NVIDIA CORPORATION.
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 >=12.0.0
- libcucim =${{ version }}
- pip
- python =${{ py_version }}
- rapids-build-backend >=0.4.0,<0.5.0.dev0
- scikit-image >=0.19.0,<0.25.0a0
- scipy >=1.6
- setuptools >=80.9.0
run:
- ${{ pin_compatible("cuda-version", upper_bound="x", lower_bound="x") }}
- click
- cuda-cudart
- cupy >=12.0.0
- lazy_loader >=0.1
- libcucim =${{ version }}
- numpy >=1.23,<3.0a0
- python
- scikit-image >=0.19.0,<0.25.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