Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace conda-build with rattler-build #4551

Draft
wants to merge 4 commits into
base: branch-24.08
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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: 23 additions & 1 deletion ci/build_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,28 @@ rapids-print-env

rapids-logger "Begin cpp build"

RAPIDS_PACKAGE_VERSION=$(rapids-generate-version) rapids-conda-retry mambabuild conda/recipes/libcugraph
# TODO: Upstream this to the image.
mamba install rattler-build -c conda-forge

# Notes on the comments in the command below (some things like file renamings
# should be done before merging):
# - rattler-build uses recipe.yaml by default, not meta.yaml.
# - rattler-build uses variants.yaml by default, not conda_build_config.yaml
# - rattler-build does not respect .condarc, so channels and the output dir
# must be explicitly specified
# - The multi-output cache is currently an experimental feature.
# (https://prefix-dev.github.io/rattler-build/dev/multiple_output_cache/)
# - By default rattler-build adds a timestamp that defeats sccache caching,
# which --no-build-id turns off
RAPIDS_PACKAGE_VERSION=$(rapids-generate-version) rattler-build build \
--recipe conda/recipes/libcugraph/meta.yaml \
--variant-config conda/recipes/libcugraph/conda_build_config.yaml \
-c rapidsai-nightly -c conda-forge \
--output-dir ${RAPIDS_CONDA_BLD_OUTPUT_DIR} \
--experimental \
--no-build-id

echo "sccache stats:"
sccache -s

rapids-upload-conda-to-s3 cpp
23 changes: 22 additions & 1 deletion conda/recipes/libcugraph/build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Copyright (c) 2019-2022, NVIDIA CORPORATION.
# Copyright (c) 2019-2024, NVIDIA CORPORATION.

# This assumes the script is executed from the root of the repo directory

Expand All @@ -8,4 +8,25 @@
# openmpi build dependencies). The conda package does NOT include these test
# binaries or extra dependencies, but these are built here for use in CI runs.

export LIBCUGRAPH_BUILD_DIR="${PREFIX}/tmp/cugraph_build"
export LIBCUGRAPH_ETL_BUILD_DIR="${PREFIX}/tmp/cugraph_etl_build"
./build.sh libcugraph libcugraph_etl cpp-mgtests -n -v --allgpuarch

# The cccl libcudacxx dir contains some broken symlinks and that causes
# rattler-build to fail out when trying to follow them to copy the files.
find ${LIBCUGRAPH_BUILD_DIR}/ -xtype l -delete

# The libarrow package contains a file that is somehow being installed accidentally, see
# https://github.com/prefix-dev/rattler-build/issues/979
# https://github.com/conda-forge/arrow-cpp-feedstock/issues/1478
rm -rf "${PREFIX}/share"

cmake --install ${LIBCUGRAPH_BUILD_DIR} --prefix ${PREFIX}/tmp/install/libcugraph/
cmake --install ${LIBCUGRAPH_ETL_BUILD_DIR} --prefix ${PREFIX}/tmp/install/libcugraph_etl/

for component in testing testing_c testing_mg; do
cmake --install ${LIBCUGRAPH_BUILD_DIR} --component ${component} --prefix ${PREFIX}/tmp/install/libcugraph_components/${component}/
done

# This is a nonexistent component that we've been installing for no reason...
#cmake --install ${LIBCUGRAPH_ETL_BUILD_DIR} --component testing --prefix ${PREFIX}/tmp/install/libcugraph_etl_components/testing/
4 changes: 2 additions & 2 deletions conda/recipes/libcugraph/install_libcugraph.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
# Copyright (c) 2022, NVIDIA CORPORATION.
# Copyright (c) 2022-2024, NVIDIA CORPORATION.

cmake --install cpp/build
cp -r ${PREFIX}/tmp/install/libcugraph/* ${PREFIX}/
9 changes: 7 additions & 2 deletions conda/recipes/libcugraph/install_libcugraph_etl.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/bin/bash
# Copyright (c) 2022, NVIDIA CORPORATION.
# Copyright (c) 2022-2024, NVIDIA CORPORATION.

cmake --install cpp/libcugraph_etl/build
cp -r ${PREFIX}/tmp/install/libcugraph_etl/* ${PREFIX}/

# The libarrow package contains a file that is somehow being installed accidentally, see
# https://github.com/prefix-dev/rattler-build/issues/979
# https://github.com/conda-forge/arrow-cpp-feedstock/issues/1478
rm -rf "${PREFIX}/share"
11 changes: 6 additions & 5 deletions conda/recipes/libcugraph/install_libcugraph_tests.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash
# Copyright (c) 2022-2023, NVIDIA CORPORATION.
# Copyright (c) 2022-2024, NVIDIA CORPORATION.

cmake --install cpp/build --component testing
cmake --install cpp/build --component testing_c
cmake --install cpp/build --component testing_mg
cmake --install cpp/libcugraph_etl/build --component testing
for component in testing testing_c testing_mg; do
cp -r ${PREFIX}/tmp/install/libcugraph_components/* ${PREFIX}/
done
# This is a nonexistent component that we've been installing for no reason...
#cp -r ${PREFIX}/tmp/install/libcugraph_etl_components/testing/* ${PREFIX}/
Loading
Loading