Skip to content

Add RAPIDS-based devcontainer for velox/cuDF/presto development#250

Open
bdice wants to merge 32 commits intorapidsai:mainfrom
bdice:devcontainer
Open

Add RAPIDS-based devcontainer for velox/cuDF/presto development#250
bdice wants to merge 32 commits intorapidsai:mainfrom
bdice:devcontainer

Conversation

@bdice
Copy link
Copy Markdown
Contributor

@bdice bdice commented Feb 23, 2026

Summary

  • Adds a full devcontainer setup (Dockerfile, devcontainer.json for cuda12.9 and cuda13.1) with build/clean/configure/test scripts for velox, presto, and RAPIDS libraries
  • Provides wrapper scripts (build-all, clean-all, configure-all) that orchestrate RAPIDS builds alongside velox and presto-native-execution
  • Includes shared helpers for RAPIDS CMake directory detection, CUDA arch resolution, and a post-create setup script

@bdice bdice force-pushed the devcontainer branch 2 times, most recently from 00f1a8c to 284ac0c Compare March 2, 2026 17:23
@bdice bdice requested a review from a team as a code owner March 20, 2026 16:29
@Avinash-Raj
Copy link
Copy Markdown
Contributor

This PR looks good to me. Let’s get it merged.

@Avinash-Raj
Copy link
Copy Markdown
Contributor

It would be better if we had a dev container script to start Presto and run Presto integration tests. Maybe we could add those on a follow up PR.

BUILD_TYPE="${BUILD_TYPE:-release}"
NUM_THREADS="${NUM_THREADS:-$(nproc --all --ignore=1)}"
BUILD_BASE_DIR="${BUILD_BASE_DIR:-/opt/velox-build}"
CUDA_ARCH="${CUDA_ARCH:-}"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried setting this to a specific arch and got an error:

Unknown option: --cuda-arch
Usage: configure-velox [OPTIONS] [-D<VAR>=<VALUE>]...

Run CMake configuration for velox without building.
Useful for IDE integration (CMake Tools, clangd, etc.)

Any -D flags are passed through to CMake, e.g.:
  configure-velox -DVELOX_ENABLE_BENCHMARKS=ON

Options:
  --release         Configure for release build (default)
  --debug           Configure for debug build
  -h, --help        Show this help message

Environment variables:
  BUILD_TYPE        release or debug
  BUILD_BASE_DIR    Base directory for build output (default: /opt/velox-build)
  CUDAARCHS         CUDA architectures (default: RAPIDS)

I'm not sure if related but the env var to set cuda arch is named differently in build-velox and configure-velox

bdice added 18 commits April 14, 2026 04:38
Adds devcontainer configurations for CUDA 12.9 and 13.1 based on
RAPIDS devcontainers infrastructure. Includes helper scripts for
building velox, presto, and RAPIDS libraries (rmm, cudf, kvikio).

Key features:
- Based on rapidsai/devcontainers with UCX and OpenMPI
- Integrates rapids-build-utils for build-rmm, build-cudf, etc.
- Auto-detects RAPIDS library paths for velox cmake configuration
- sccache with S3 remote caching and sccache-dist support
- Persisted venvs, pip cache, and bash history across rebuilds
- Codespaces support
VELOX_DEPENDENCY_SOURCE is read from env by CMake, but individual
overrides like GTest_SOURCE, cudf_SOURCE, duckdb_SOURCE, faiss_SOURCE
must be passed as -D flags to CMake.
- Fix DuckDB_SOURCE case sensitivity (DuckDB vs duckdb)
- Resolve CUDAARCHS from RAPIDS to actual architecture list for CUDA 13.x
- Use prebuilt cudf (SYSTEM) when available, fall back to BUNDLED
- Add BUNDLED sources: simdjson, FastFloat, folly, absl, gRPC, xsimd, Arrow, geos
- Add system packages: libfmt-dev, libprotobuf-dev, libprotoc-dev, libc-ares-dev,
  libstemmer-dev, libboost-all-dev, bison, flex, protobuf-compiler
Standalone velox now bundles all dependencies (folly, xsimd, etc.) with no
prerequisites. FB OSS deps (folly, fbthrift, proxygen) are built automatically
inside build-presto on first run and cached at /opt/fb-deps.

- Extract shared constants and RAPIDS detection to _common.sh
- Fix xsimd_SOURCE override bug in configure-velox (BUNDLED always won)
- Fix CUDAARCHS not propagating to presto build (was setting wrong var)
- Fix test-presto pointing at nonexistent release/ subdirectory
- Add ldconfig for /opt/fb-deps/lib so presto tests find shared libs
- Add libxxhash-dev and gperf to Dockerfile (fbthrift build deps)
- Add -no-pie linker flag and -Wno-error=nonnull for presto link
- Add devcontainer README
Replace === heading === banners with bold-cyan/bold-green ANSI headings
matching the build-rmm / build-cudf pattern:
  echo -e "\033[1;36m<Section>\033[0m"  # cyan heading
  echo -e "\033[1;32m<Completion>\033[0m"  # green completion
bdice added 13 commits April 14, 2026 04:38
…TINES

Dep-skip guard now also tests for libproxygen.so so a partial install
(folly present, proxygen absent) correctly triggers a full dep rebuild.

Pass -UFOLLY_CFG_NO_COROUTINES in CMAKE_CXX_FLAGS to undo the global
add_compile_definitions in presto's CMakeLists.txt. That define forces
FOLLY_HAS_COROUTINES=0, which breaks fbthrift headers (BiDiStream.h
etc.) that unconditionally reference folly::coro::AsyncGenerator.
Velox has no folly::coro usage so removing the define for all TUs
is safe.
This reverts commit d72679f.
Rename CUDA_ARCH to CUDAARCHS in build-velox to match the CMake
standard env var used by configure-velox. Add --cuda-arch CLI flag
to configure-velox so it can be called directly or forwarded from
build-velox.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants