Skip to content
Merged
Changes from 2 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
18 changes: 15 additions & 3 deletions velox/docker/adapters_build.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ RUN unzip -d /usr/bin -o /tmp/ninja-linux.zip
FROM ghcr.io/facebookincubator/velox-dev:adapters
ARG TARGETARCH


# Do this separate so changing unrelated build args doesn't invalidate nsys installation layer
ARG VELOX_ENABLE_BENCHMARKS=ON

Expand Down Expand Up @@ -70,7 +69,11 @@ ARG SCCACHE_NO_CACHE
ARG SCCACHE_NO_DIST_COMPILE

# Environment mirroring upstream CI defaults and incorporating build args
ENV VELOX_DEPENDENCY_SOURCE=SYSTEM \
# CC/CXX override to use gcc-toolset-14 (base image uses gcc-toolset-12)
# Reference: https://github.com/facebookincubator/velox/pull/15427
ENV CC=/opt/rh/gcc-toolset-14/root/bin/gcc \
CXX=/opt/rh/gcc-toolset-14/root/bin/g++ \
VELOX_DEPENDENCY_SOURCE=SYSTEM \
GTest_SOURCE=BUNDLED \
cudf_SOURCE=BUNDLED \
faiss_SOURCE=BUNDLED \
Expand All @@ -79,7 +82,7 @@ ENV VELOX_DEPENDENCY_SOURCE=SYSTEM \
MAKEFLAGS="NUM_THREADS=${NUM_THREADS}" \
CUDA_ARCHITECTURES=${CUDA_ARCHITECTURES} \
CUDA_COMPILER=/usr/local/cuda-${CUDA_VERSION}/bin/nvcc \
CUDA_FLAGS="-ccbin /opt/rh/gcc-toolset-12/root/usr/bin" \
CUDA_FLAGS="-ccbin /opt/rh/gcc-toolset-14/root/usr/bin" \
BUILD_TYPE=${BUILD_TYPE} \
EXTRA_CMAKE_FLAGS="-DVELOX_ENABLE_BENCHMARKS=${VELOX_ENABLE_BENCHMARKS} \
-DVELOX_ENABLE_EXAMPLES=ON \
Expand Down Expand Up @@ -146,6 +149,15 @@ RUN \
<<EOF
set -euxo pipefail;

# Enable gcc-toolset-14 and set compilers
# Reference: https://github.com/facebookincubator/velox/pull/15427
source /opt/rh/gcc-toolset-14/enable;
export CC=gcc CXX=g++;

# Verify gcc version
echo "Using GCC version:";
gcc --version | head -1;

# Install and configure sccache if enabled
if [ "$ENABLE_SCCACHE" = "ON" ]; then
# Run sccache setup script
Expand Down