Skip to content
Open
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
69 changes: 29 additions & 40 deletions dev/dockerfiles/devel/main.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

ARG AMD64_BASE
ARG ARM64_BASE
ARG NODE_VERSION=16.15.1
ARG NODE_VERSION=16.20.2

FROM node:$NODE_VERSION-bullseye-slim as node

Expand Down Expand Up @@ -36,12 +36,12 @@ ${CUDA_HOME}/lib64:\
${CUDA_HOME}/nvvm/lib64:\
${CUDA_HOME}/lib64/stubs"

ARG GCC_VERSION=9
ARG CMAKE_VERSION=3.26.0-rc2
ARG SCCACHE_VERSION=0.2.15
ARG GCC_VERSION=13
ARG CMAKE_VERSION=3.30.5
ARG SCCACHE_VERSION=0.10.0
ARG LINUX_VERSION=ubuntu20.04

ARG NODE_VERSION=16.15.1
ARG NODE_VERSION=16.20.2
ENV NODE_VERSION=$NODE_VERSION

# Install node
Expand Down Expand Up @@ -137,31 +137,19 @@ ONBUILD ARG ADDITIONAL_GROUPS="--groups sudo,video"

FROM compilers as main-amd64

ONBUILD ARG LLDB_VERSION=17
ONBUILD ARG CLANGD_VERSION=17
ONBUILD ARG CLANG_FORMAT_VERSION=17
ONBUILD ARG LLDB_VERSION=18
ONBUILD ARG CLANGD_VERSION=18
ONBUILD ARG CLANG_FORMAT_VERSION=18

# Install dependencies and dev tools (llnode etc.)
ONBUILD RUN export DEBIAN_FRONTEND=noninteractive \
# Install LLVM apt sources
&& wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
&& bash -c 'echo -e "\
deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-${LLDB_VERSION} main\n\
deb-src http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-${LLDB_VERSION} main\n\
" | tee /etc/apt/sources.list.d/llvm-${LLDB_VERSION}.list >/dev/null' \
&& bash -c 'echo -e "\
deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-${CLANGD_VERSION} main\n\
deb-src http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-${CLANGD_VERSION} main\n\
" | tee /etc/apt/sources.list.d/llvm-${CLANGD_VERSION}.list >/dev/null' \
&& bash -c 'echo -e "\
deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-${CLANG_FORMAT_VERSION} main\n\
deb-src http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-${CLANG_FORMAT_VERSION} main\n\
" | tee /etc/apt/sources.list.d/llvm-${CLANG_FORMAT_VERSION}.list >/dev/null' \
\
# For Ubuntu 24.04, LLVM 18 is the default version in the main repos
&& apt update \
&& apt install --no-install-recommends -y \
# lldb (for llnode)
lldb-${LLDB_VERSION} libllvm${LLDB_VERSION} \
# Python 3.12 (Ubuntu 24.04) requires python3-setuptools for distutils compatibility
python3 python3-pip python3-setuptools python3-dev \
# lldb (for llnode) - LLVM 18 packages
lldb-${LLDB_VERSION} libllvm${LLDB_VERSION} llvm-${LLDB_VERSION}-dev \
# clangd for C++ intellisense and debugging
clangd-${CLANGD_VERSION} \
# clang-format for automatically formatting C++ and TS/JS
Expand All @@ -187,7 +175,11 @@ deb-src http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -c
&& update-alternatives --set lldb /usr/bin/lldb-${LLDB_VERSION} \
\
# Globally install llnode
&& npm install --location global --unsafe-perm --no-audit --no-fund --no-update-notifier llnode \
&& mkdir -p /usr/local/lib/llnode \
&& wget -O - https://github.com/trxcllnt/llnode/archive/refs/heads/use-llvm-project-monorepo.tar.gz \
| tar -C /usr/local/lib/llnode -xzf - --strip-components=1 \
&& npm pack --pack-destination /usr/local/lib/llnode /usr/local/lib/llnode \
&& npm install --location=global --unsafe-perm --no-audit --no-fund --no-update-notifier /usr/local/lib/llnode/llnode-*.tgz \
&& echo "llnode: $(which -a llnode)" \
&& echo "llnode version: $(llnode --version)" \
\
Expand All @@ -198,10 +190,7 @@ deb-src http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -c
/var/tmp/* \
/var/cache/apt/* \
/var/lib/apt/lists/* \
/usr/local/lib/llnode \
/etc/apt/sources.list.d/llvm-${LLDB_VERSION}.list \
/etc/apt/sources.list.d/llvm-${CLANGD_VERSION}.list \
/etc/apt/sources.list.d/llvm-${CLANG_FORMAT_VERSION}.list
/usr/local/lib/llnode

FROM main-${TARGETARCH}

Expand Down Expand Up @@ -234,10 +223,8 @@ RUN export DEBIAN_FRONTEND=noninteractive \
# UCX runtime dependencies
libibverbs-dev librdmacm-dev libnuma-dev \
\
# Install UCX
&& wget -O /var/cache/apt/archives/ucx-v${UCX_VERSION}-${LINUX_VERSION}-mofed5-cuda11.deb \
https://github.com/openucx/ucx/releases/download/v${UCX_VERSION}/ucx-v${UCX_VERSION}-${LINUX_VERSION}-mofed5-cuda11.deb \
&& dpkg -i /var/cache/apt/archives/ucx-v${UCX_VERSION}-${LINUX_VERSION}-mofed5-cuda11.deb || true && apt --fix-broken install -y \
# Install UCX (use system packages for Ubuntu 24.04)
&& apt install --no-install-recommends -y libucx-dev libucx0 ucx-utils \
\
# Install fixuid
&& curl -SsL "https://github.com/boxboat/fixuid/releases/download/v$FIXUID_VERSION/fixuid-$FIXUID_VERSION-linux-${TARGETARCH}.tar.gz" \
Expand All @@ -251,12 +238,14 @@ paths:\n\
- /opt/rapids/node\n\
" | tee /etc/fixuid/config.yml >/dev/null' \
\
# Add a non-root user
&& useradd \
--uid 1000 --shell /bin/bash \
--user-group ${ADDITIONAL_GROUPS} \
--create-home --home-dir /opt/rapids \
rapids \
# Add a non-root user (handle existing UID 1000)
&& if getent passwd 1000 >/dev/null 2>&1; then \
existing_user=$(getent passwd 1000 | cut -d: -f1); \
usermod -l rapids -d /opt/rapids -m $existing_user; \
groupmod -n rapids $existing_user; \
else \
useradd --uid 1000 --shell /bin/bash --user-group ${ADDITIONAL_GROUPS} --create-home --home-dir /opt/rapids rapids; \
fi \
&& mkdir -p /opt/rapids/node/.cache \
&& mkdir -p -m 0700 /opt/rapids/.ssh \
\
Expand Down
8 changes: 7 additions & 1 deletion dev/dockerfiles/runtime/base.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,13 @@ COPY --from=devel /usr/local/cuda/lib64/libnvrtc* /usr/local/cuda/lib64/
ARG UID=1000
ARG ADDITIONAL_GROUPS

RUN useradd --uid $UID --user-group ${ADDITIONAL_GROUPS} --shell /bin/bash --create-home node \
RUN if getent passwd $UID >/dev/null 2>&1; then \
existing_user=$(getent passwd $UID | cut -d: -f1); \
usermod -l node -d /home/node -m $existing_user; \
groupmod -n node $existing_user; \
else \
useradd --uid $UID --user-group ${ADDITIONAL_GROUPS} --shell /bin/bash --create-home node; \
fi \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs \
&& ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm \
&& ln -s /usr/local/lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx \
Expand Down
3 changes: 1 addition & 2 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"modules/demo/tfjs/*",
"modules/demo/client-server",
"modules/demo/api-server",
"modules/demo/viz-app",
"modules/demo/sql/*"
"modules/demo/viz-app"
]
}
8 changes: 4 additions & 4 deletions modules/core/bin/install-deps/debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ install_vscode() {

install_clangd() {
INSTALLED_CLANGD=1
APT_DEPS="${APT_DEPS:+$APT_DEPS }clangd-17 clang-format-17"
APT_DEPS="${APT_DEPS:+$APT_DEPS }clangd-18 clang-format-18"
if [ ! -d "/etc/apt/sources.list.d/llvm.list" ]; then
curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
echo "deb http://apt.llvm.org/$OS_RELEASE/ llvm-toolchain-$OS_RELEASE-17 main
deb-src http://apt.llvm.org/$OS_RELEASE/ llvm-toolchain-$OS_RELEASE-17 main
echo "deb http://apt.llvm.org/$OS_RELEASE/ llvm-toolchain-$OS_RELEASE-18 main
deb-src http://apt.llvm.org/$OS_RELEASE/ llvm-toolchain-$OS_RELEASE-18 main
" | sudo tee /etc/apt/sources.list.d/llvm.list
fi
}
Expand Down Expand Up @@ -101,7 +101,7 @@ if [ -n "$APT_DEPS" ]; then
sudo apt update
sudo apt install -y $APT_DEPS;
if [ -n "$INSTALLED_CLANGD" ]; then
sudo update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-17 100
sudo update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-18 100
sudo update-alternatives --set clangd /usr/bin/clangd
fi
fi
Expand Down
33 changes: 31 additions & 2 deletions modules/core/cmake/Modules/ConfigureArrow.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ function(find_and_configure_arrow VERSION BUILD_STATIC ENABLE_S3 ENABLE_ORC ENAB
"ARROW_WITH_BACKTRACE ON"
"ARROW_CXXFLAGS -w"
"ARROW_JEMALLOC OFF"
"ARROW_ACERO ON"
"ARROW_S3 ${ENABLE_S3}"
"ARROW_ORC ${ENABLE_ORC}"
# e.g. needed by blazingsql-io
Expand Down Expand Up @@ -199,6 +200,34 @@ function(find_and_configure_arrow VERSION BUILD_STATIC ENABLE_S3 ENABLE_ORC ENAB
"$<BUILD_INTERFACE:${Arrow_SOURCE_DIR}/cpp/thirdparty/flatbuffers/include>"
)
endforeach()

# Fix for Arrow static library CMake export errors (from cuDF project)
# The `arrow_static` library is leaking a dependency on the object libraries it was built with
# we need to remove this from the interface, since keeping them around would cause duplicate
# symbols and CMake export errors
if(BUILD_STATIC)
# Fix arrow_static target
if(TARGET arrow_static)
get_target_property(interface_libs arrow_static INTERFACE_LINK_LIBRARIES)
if(interface_libs MATCHES "arrow_array" AND interface_libs MATCHES "arrow_compute")
string(REPLACE "BUILD_INTERFACE:" "BUILD_LOCAL_INTERFACE:" interface_libs
"${interface_libs}"
)
set_target_properties(arrow_static PROPERTIES INTERFACE_LINK_LIBRARIES "${interface_libs}")
endif()
endif()

# Fix arrow_dataset_static target
if(TARGET arrow_dataset_static)
get_target_property(interface_libs arrow_dataset_static INTERFACE_LINK_LIBRARIES)
if(interface_libs MATCHES "arrow_acero")
string(REPLACE "BUILD_INTERFACE:" "BUILD_LOCAL_INTERFACE:" interface_libs
"${interface_libs}"
)
set_target_properties(arrow_dataset_static PROPERTIES INTERFACE_LINK_LIBRARIES "${interface_libs}")
endif()
endif()
endif()
endif()
else()
set(ARROW_FOUND FALSE)
Expand Down Expand Up @@ -407,12 +436,12 @@ function(find_and_configure_arrow VERSION BUILD_STATIC ENABLE_S3 ENABLE_ORC ENAB

endfunction()

set(CUDF_VERSION_Arrow 9.0.0)
set(CUDF_VERSION_Arrow 19.0.0)

find_and_configure_arrow(
${CUDF_VERSION_Arrow}
ON # BUILD_STATIC
OFF # ENABLE_S3
ON # ENABLE_S3
OFF # ENABLE_ORC
OFF # ENABLE_PYTHON
ON # ENABLE_PARQUET
Expand Down
25 changes: 15 additions & 10 deletions modules/core/cmake/Modules/ConfigureCUDF.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,15 @@ function(find_and_configure_cudf)
"Thrift_SOURCE BUNDLED"
"CUDA_STATIC_RUNTIME ON"
"CUDF_USE_ARROW_STATIC ON"
"CUDF_ENABLE_ARROW_S3 OFF"
# "CUDF_ENABLE_ARROW_S3 ON"
"CUDF_ENABLE_ARROW_S3 ON"
# "CUDF_ENABLE_ARROW_S3 OFF"
"CUDF_ENABLE_ARROW_ORC OFF"
"CUDF_ENABLE_ARROW_PYTHON OFF"
"CUDF_ENABLE_ARROW_PARQUET ON"
"CUDF_ENABLE_ARROW_ACERO ON"
# "ARROW_DEPENDENCY_SOURCE AUTO"
"DISABLE_DEPRECATION_WARNING ON"
"CUDF_USE_PROPRIETARY_NVCOMP OFF"
"CUDF_USE_PROPRIETARY_NVCOMP ON"
"CUDF_USE_PER_THREAD_DEFAULT_STREAM ON")
endif()

Expand All @@ -73,15 +74,19 @@ function(find_and_configure_cudf)

_set_package_dir_if_exists(nvcomp nvcomp)
find_package(nvcomp)
set_target_properties(nvcomp
PROPERTIES ARCHIVE_OUTPUT_DIRECTORY "${nvcomp_ROOT}"
LIBRARY_OUTPUT_DIRECTORY "${nvcomp_ROOT}")
if(TARGET nvcomp::nvcomp)
set_target_properties(nvcomp::nvcomp
PROPERTIES ARCHIVE_OUTPUT_DIRECTORY "${nvcomp_ROOT}"
LIBRARY_OUTPUT_DIRECTORY "${nvcomp_ROOT}")
endif()

include(CMakePackageConfigHelpers)
write_basic_package_version_file(
${nvcomp_ROOT}/nvcomp-config-version.cmake
VERSION 2.3
COMPATIBILITY ExactVersion)
if(nvcomp_ROOT AND IS_DIRECTORY ${nvcomp_ROOT})
write_basic_package_version_file(
${nvcomp_ROOT}/nvcomp-config-version.cmake
VERSION 4.2.0.11
COMPATIBILITY ExactVersion)
endif()

include(${CMAKE_CURRENT_FUNCTION_LIST_DIR}/link_utils.cmake)
_statically_link_cuda_toolkit_libs(cudf::cudf)
Expand Down
3 changes: 2 additions & 1 deletion modules/core/cmake/Modules/ConfigureCXX.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ unset(CMAKE_CUDA_FLAGS CACHE)

if(CMAKE_COMPILER_IS_GNUCXX)
option(NODE_RAPIDS_CMAKE_CXX11_ABI "Enable the GLIBCXX11 ABI" ON)
list(APPEND NODE_RAPIDS_CMAKE_CXX_FLAGS -Wall -Werror -Wno-unknown-pragmas -Wno-error=deprecated-declarations)
list(APPEND NODE_RAPIDS_CMAKE_CXX_FLAGS -Wall -Wno-unknown-pragmas -Wno-error=deprecated-declarations -Wno-error=maybe-uninitialized)
list(APPEND NODE_RAPIDS_CMAKE_CUDA_FLAGS -Xcompiler=-Wno-error=maybe-uninitialized)
if(NODE_RAPIDS_CMAKE_CXX11_ABI)
message(STATUS "Enabling the GLIBCXX11 ABI")
else()
Expand Down
1 change: 1 addition & 0 deletions modules/core/cmake/Modules/ConfigureRMM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ function(find_and_configure_rmm)
${UPDATE_DISCONNECTED}
OPTIONS "BUILD_TESTS OFF"
"BUILD_BENCHMARKS OFF"
"RMM_LOGGING_LEVEL TRACE"
"DISABLE_DEPRECATION_WARNING ${DISABLE_DEPRECATION_WARNINGS}")
endif()

Expand Down
4 changes: 3 additions & 1 deletion modules/core/cmake/Modules/ConfigureThrust.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,6 @@ function(find_and_configure_thrust VERSION)
set(CPM_THRUST_CURRENT_VERSION "${VERSION}.0" CACHE STRING "version of thrust we checked out" FORCE)
endfunction()

find_and_configure_thrust(1.17.2)
# Use CCCL unified version for RAPIDS 25.02 compatibility
# find_and_configure_thrust(1.17.2)
# Instead, CCCL will provide Thrust 2.7.0 through the unified package
7 changes: 4 additions & 3 deletions modules/core/cmake/versions.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"packages": {
"nvcomp": {
"version": "2.4.1",
"version": "4.2.0.11",
"git_url": "https://github.com/NVIDIA/nvcomp.git",
"git_tag": "v2.2.0",
"git_tag": "main",
"proprietary_binary": {
"x86_64-linux": "http://developer.download.nvidia.com/compute/nvcomp/${version}/local_installers/nvcomp_${version}_Linux_CUDA_11.x.tgz"
"aarch64-linux": "https://developer.download.nvidia.com/compute/nvcomp/redist/nvcomp/linux-sbsa/nvcomp-linux-sbsa-${version}_cuda12-archive.tar.xz",
"x86_64-linux": "https://developer.download.nvidia.com/compute/nvcomp/redist/nvcomp/linux-x86_64/nvcomp-linux-x86_64-${version}_cuda12-archive.tar.xz"
}
},
"Thrust": {
Expand Down
11 changes: 6 additions & 5 deletions modules/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,23 @@
"tsc:watch": "yarn tsc:clean && tsc -p ./tsconfig.json -w"
},
"dependencies": {
"@types/node": "^15.0.0",
"@types/node": "^16.0.0",
"bindings": "^1.5.0",
"cmake-js": "7.2.1",
"cross-env": "7.0.3",
"getos": "3.2.1",
"tslib": "^2.3.0"
},
"devDependencies": {
"@types/jest": "26.0.23",
"@types/flatbuffers": "2.0.1",
"@types/jest": "29.5.12",
"dotenv": "8.2.0",
"jest": "26.5.3",
"jest": "29.7.0",
"node-addon-api": "4.2.0",
"rimraf": "3.0.0",
"ts-jest": "26.5.3",
"ts-jest": "29.2.5",
"typedoc": "0.22.10",
"typescript": "4.5.5"
"typescript": "5.3.3"
},
"files": [
"LICENSE",
Expand Down
1 change: 1 addition & 0 deletions modules/core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"exclude": ["node_modules"],
"compilerOptions": {
"baseUrl": "./",
"types": ["node"],
"paths": {
"@rapidsai/core": ["src/index"],
"@rapidsai/core/*": ["src/*"]
Expand Down
14 changes: 14 additions & 0 deletions modules/cuda/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
#=============================================================================
cmake_minimum_required(VERSION 3.24.1 FATAL_ERROR)

# Force conda GCC 11 if available
if(DEFINED ENV{CONDA_PREFIX})
set(CMAKE_C_COMPILER "$ENV{CONDA_PREFIX}/bin/x86_64-conda-linux-gnu-gcc" CACHE FILEPATH "C compiler" FORCE)
set(CMAKE_CXX_COMPILER "$ENV{CONDA_PREFIX}/bin/x86_64-conda-linux-gnu-g++" CACHE FILEPATH "C++ compiler" FORCE)
endif()

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
unset(CMAKE_LIBRARY_OUTPUT_DIRECTORY)
unset(CMAKE_LIBRARY_OUTPUT_DIRECTORY CACHE)
Expand Down Expand Up @@ -45,6 +51,13 @@ include("${NODE_RAPIDS_CMAKE_MODULES_PATH}/ConfigureCUDA.cmake")
include("${NODE_RAPIDS_CMAKE_MODULES_PATH}/ConfigureNapi.cmake")
include("${NODE_RAPIDS_CMAKE_MODULES_PATH}/install_utils.cmake")

# Print compiler information
message(STATUS "C++ Compiler: ${CMAKE_CXX_COMPILER}")
message(STATUS "C++ Compiler ID: ${CMAKE_CXX_COMPILER_ID}")
message(STATUS "C++ Compiler Version: ${CMAKE_CXX_COMPILER_VERSION}")
message(STATUS "CUDA Compiler: ${CMAKE_CUDA_COMPILER}")
message(STATUS "CUDA Compiler Version: ${CMAKE_CUDA_COMPILER_VERSION}")

###################################################################################################
# - rapidsai_cuda target ------------------------------------------------------------------------------

Expand Down Expand Up @@ -84,6 +97,7 @@ target_compile_definitions(${PROJECT_NAME}

target_link_libraries(${PROJECT_NAME}
PUBLIC ${CMAKE_JS_LIB}
CUDA::cuda_driver
CUDA::nvrtc_static
CUDA::cudart_static
CUDA::nppig_static
Expand Down
Loading