diff --git a/.github/workflows/linux-build-base.yml b/.github/workflows/linux-build-base.yml index 80bc40c98bdf..4f6e6979bab6 100644 --- a/.github/workflows/linux-build-base.yml +++ b/.github/workflows/linux-build-base.yml @@ -40,7 +40,7 @@ jobs: simdjson_SOURCE: BUNDLED xsimd_SOURCE: BUNDLED geos_SOURCE: BUNDLED - CUDA_VERSION: "12.4" + CUDA_VERSION: "12.8" USE_CLANG: "${{ inputs.use-clang && 'true' || 'false' }}" steps: - uses: actions/checkout@v4 diff --git a/docker-compose.yml b/docker-compose.yml index 6c2a27ab2d19..a86fd442c8d3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -52,13 +52,48 @@ services: environment: NUM_THREADS: 8 # default value for NUM_THREADS CCACHE_DIR: "/velox/.ccache" - EXTRA_CMAKE_FLAGS: -DVELOX_ENABLE_PARQUET=ON + EXTRA_CMAKE_FLAGS: -DVELOX_ENABLE_PARQUET=ON -DVELOX_ENABLE_S3=ON volumes: - .:/velox:delegated working_dir: /velox command: /velox/scripts/docker-command.sh + adapters-cuda: + # Usage: + # docker-compose pull adapters-cuda or docker-compose build adapters-cuda + # or + # docker-compose run --rm adapters-cuda + # or + # docker-compose run -e NUM_THREADS= --rm adapters-cuda + # to set the number of threads used during compilation + # scripts/adapters.dockerfile uses SHELL which is not supported for OCI image format. + # podman users must specify "--podman-build-args='--format docker'" argument. + image: ghcr.io/facebookincubator/velox-dev:adapters + build: + context: . + dockerfile: scripts/adapters.dockerfile + args: + image: ghcr.io/facebookincubator/velox-dev:centos9 + environment: + NUM_THREADS: 8 # default value for NUM_THREADS + CCACHE_DIR: "/velox/.ccache" + EXTRA_CMAKE_FLAGS: -DVELOX_ENABLE_PARQUET=ON + -DVELOX_ENABLE_S3=ON + privileged: true + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: 1 + capabilities: [gpu] + volumes: + - .:/velox:delegated + working_dir: /velox + command: /velox/scripts/docker-command.sh + + centos-cpp: # Usage: # docker-compose pull centos-cpp or docker-compose build centos-cpp diff --git a/scripts/adapters.dockerfile b/scripts/adapters.dockerfile index 8d90017455d2..15ca64b556eb 100644 --- a/scripts/adapters.dockerfile +++ b/scripts/adapters.dockerfile @@ -17,8 +17,23 @@ FROM $image COPY scripts/setup-helper-functions.sh / COPY scripts/setup-adapters.sh / -RUN mkdir build && ( cd build && source /opt/rh/gcc-toolset-12/enable && \ - bash /setup-adapters.sh ) && rm -rf build && dnf remove -y conda && dnf clean all +COPY scripts/setup-centos9.sh / +RUN mkdir build && \ + ( \ + cd build && \ + source /opt/rh/gcc-toolset-12/enable && \ + bash /setup-adapters.sh && \ + source /setup-centos9.sh && \ + install_cuda 12.8 \ + ) && \ + rm -rf build && dnf remove -y conda && dnf clean all + +# put CUDA binaries on the PATH +ENV PATH /usr/local/cuda/bin:${PATH} + +# configuration for nvidia-container-toolkit +ENV NVIDIA_VISIBLE_DEVICES all +ENV NVIDIA_DRIVER_CAPABILITIES compute,utility # install miniforge RUN curl -L -o /tmp/miniforge.sh https://github.com/conda-forge/miniforge/releases/download/23.11.0-0/Mambaforge-23.11.0-0-Linux-x86_64.sh && \ diff --git a/scripts/setup-centos9.sh b/scripts/setup-centos9.sh index 5b9e5cc6c374..2ce9f869317b 100755 --- a/scripts/setup-centos9.sh +++ b/scripts/setup-centos9.sh @@ -234,7 +234,11 @@ function install_cuda { # See https://developer.nvidia.com/cuda-downloads dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64/cuda-rhel9.repo local dashed="$(echo $1 | tr '.' '-')" - dnf install -y cuda-nvcc-$dashed cuda-cudart-devel-$dashed cuda-nvrtc-devel-$dashed cuda-driver-devel-$dashed + dnf install -y \ + cuda-compat-$dashed \ + cuda-driver-devel-$dashed \ + cuda-minimal-build-$dashed \ + cuda-nvrtc-devel-$dashed } function install_geos { diff --git a/scripts/setup-ubuntu.sh b/scripts/setup-ubuntu.sh index c3ffacd1a750..80b08375d5f1 100755 --- a/scripts/setup-ubuntu.sh +++ b/scripts/setup-ubuntu.sh @@ -293,7 +293,11 @@ function install_cuda { $SUDO apt update fi local dashed="$(echo $1 | tr '.' '-')" - $SUDO apt install -y cuda-nvcc-$dashed cuda-cudart-dev-$dashed cuda-nvrtc-dev-$dashed cuda-driver-dev-$dashed + $SUDO apt install -y \ + cuda-compat-$dashed \ + cuda-driver-dev-$dashed \ + cuda-minimal-build-$dashed \ + cuda-nvrtc-dev-$dashed } function install_geos {