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

Add support for Centos9 Stream + GCC12 #9903

Closed
Closed
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
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ jobs:
file: "scripts/check-container.dockfile"
args: "cpu_target=avx"
tags: "ghcr.io/facebookincubator/velox-dev:check-avx"
- name: Centos 8
- name: Centos 9
file: "scripts/centos.dockerfile"
args: "cpu_target=avx"
tags: "ghcr.io/facebookincubator/velox-dev:centos8"
tags: "ghcr.io/facebookincubator/velox-dev:centos9"
- name: Dev
file: "scripts/ubuntu-22.04-cpp.dockerfile"
args: ""
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ jobs:
- name: "Build"
run: |
cd velox
source /opt/rh/gcc-toolset-9/enable
source /opt/rh/gcc-toolset-12/enable
make debug NUM_THREADS="${{ inputs.numThreads || 8 }}" MAX_HIGH_MEM_JOBS="${{ inputs.maxHighMemJobs || 8 }}" MAX_LINK_JOBS="${{ inputs.maxLinkJobs || 4 }}" EXTRA_CMAKE_FLAGS="-DVELOX_ENABLE_ARROW=ON ${{ inputs.extraCMakeFlags }}"
ccache -s
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
VELOX_DEPENDENCY_SOURCE: SYSTEM
simdjson_SOURCE: BUNDLED
xsimd_SOURCE: BUNDLED
CUDA_VERSION: "11.8"
CUDA_VERSION: "12.4"
steps:
- uses: actions/checkout@v4

Expand All @@ -70,6 +70,15 @@ jobs:
# it doesn't work
run: git config --global --add safe.directory /__w/velox/velox

- name: Install Dependencies
run: |
# Allows to install arbitrary cuda-version whithout needing to update
# docker container before. It simplifies testing new/different versions
if ! yum list installed cuda-nvcc-$(echo ${CUDA_VERSION} | tr '.' '-') 1>/dev/null; then
source scripts/setup-centos9.sh
install_cuda ${CUDA_VERSION}
fi
- uses: assignUser/stash/restore@v1
with:
path: '${{ env.CCACHE_DIR }}'
Expand All @@ -82,6 +91,10 @@ jobs:
- name: Make Release Build
env:
MAKEFLAGS: 'NUM_THREADS=8 MAX_HIGH_MEM_JOBS=4 MAX_LINK_JOBS=4'
CUDA_ARCHITECTURES: 70
CUDA_COMPILER: /usr/local/cuda-${CUDA_VERSION}/bin/nvcc
# Set compiler to GCC 12
CUDA_FLAGS: "-ccbin /opt/rh/gcc-toolset-12/root/usr/bin"
run: |
EXTRA_CMAKE_FLAGS=(
"-DVELOX_ENABLE_BENCHMARKS=ON"
Expand All @@ -92,6 +105,7 @@ jobs:
"-DVELOX_ENABLE_GCS=ON"
"-DVELOX_ENABLE_ABFS=ON"
"-DVELOX_ENABLE_REMOTE_FUNCTIONS=ON"
"-DVELOX_ENABLE_GPU=ON"
)
make release EXTRA_CMAKE_FLAGS="${EXTRA_CMAKE_FLAGS[*]}"
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
# prevent errors when forks ff their main branch
if: ${{ github.repository == 'facebookincubator/velox' }}
runs-on: 16-core-ubuntu
container: ghcr.io/facebookincubator/velox-dev:centos8
container: ghcr.io/facebookincubator/velox-dev:centos9
timeout-minutes: 120
env:
CCACHE_DIR: "/__w/velox/velox/.ccache"
Expand Down Expand Up @@ -323,7 +323,7 @@ jobs:
name: Presto Fuzzer
if: ${{ needs.compile.outputs.presto_bias != 'true' }}
runs-on: ubuntu-latest
container: ghcr.io/facebookincubator/velox-dev:centos8
container: ghcr.io/facebookincubator/velox-dev:centos9
needs: compile
timeout-minutes: 120
steps:
Expand Down Expand Up @@ -394,7 +394,7 @@ jobs:
presto-bias-fuzzer:
name: Presto Bias Fuzzer
runs-on: ubuntu-latest
container: ghcr.io/facebookincubator/velox-dev:centos8
container: ghcr.io/facebookincubator/velox-dev:centos9
needs: compile
if: ${{ needs.compile.outputs.presto_bias == 'true' }}
timeout-minutes: 120
Expand Down Expand Up @@ -445,7 +445,7 @@ jobs:
spark-aggregate-fuzzer-run:
name: Spark Aggregate Fuzzer
runs-on: ubuntu-latest
container: ghcr.io/facebookincubator/velox-dev:centos8
container: ghcr.io/facebookincubator/velox-dev:centos9
needs: compile
timeout-minutes: 60
steps:
Expand Down Expand Up @@ -479,7 +479,7 @@ jobs:
spark-bias-fuzzer:
name: Spark Bias Fuzzer
runs-on: ubuntu-latest
container: ghcr.io/facebookincubator/velox-dev:centos8
container: ghcr.io/facebookincubator/velox-dev:centos9
needs: compile
if: ${{ needs.compile.outputs.spark_bias == 'true' }}
timeout-minutes: 120
Expand Down Expand Up @@ -523,7 +523,7 @@ jobs:
name: Spark Fuzzer
if: ${{ needs.compile.outputs.spark_bias != 'true' }}
runs-on: ubuntu-latest
container: ghcr.io/facebookincubator/velox-dev:centos8
container: ghcr.io/facebookincubator/velox-dev:centos9
needs: compile
timeout-minutes: 120
steps:
Expand Down Expand Up @@ -564,7 +564,7 @@ jobs:
join-fuzzer-run:
name: Join Fuzzer
runs-on: ubuntu-latest
container: ghcr.io/facebookincubator/velox-dev:centos8
container: ghcr.io/facebookincubator/velox-dev:centos9
needs: compile
timeout-minutes: 120
steps:
Expand Down Expand Up @@ -598,7 +598,7 @@ jobs:
exchange-fuzzer-run:
name: Exchange Fuzzer
runs-on: ubuntu-latest
container: ghcr.io/facebookincubator/velox-dev:centos8
container: ghcr.io/facebookincubator/velox-dev:centos9
needs: compile
timeout-minutes: 120
steps:
Expand Down Expand Up @@ -634,7 +634,7 @@ jobs:
row-number-fuzzer-run:
name: RowNumber Fuzzer
runs-on: ubuntu-latest
container: ghcr.io/facebookincubator/velox-dev:centos8
container: ghcr.io/facebookincubator/velox-dev:centos9
needs: compile
timeout-minutes: 120
steps:
Expand Down
30 changes: 28 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,45 @@ services:
- .:/velox:delegated
command: scripts/docker-command.sh

adapters-cpp:
# Usage:
# docker-compose pull adapters-cpp or docker-compose build adapters-cpp
# or
# docker-compose run --rm adapters-cpp
# or
# docker-compose run -e NUM_THREADS=<NUMBER_OF_THREADS_TO_USE> --rm adapters-cpp
# 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
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
# docker-compose run --rm centos-cpp
# or
# docker-compose run -e NUM_THREADS=<NUMBER_OF_THREADS_TO_USE> --rm centos-cpp
# to set the number of threads used during compilation
image: ghcr.io/facebookincubator/velox-dev:centos8
image: ghcr.io/facebookincubator/velox-dev:centos9
build:
context: .
dockerfile: scripts/centos.dockerfile
args:
image: quay.io/centos/centos:stream8
image: quay.io/centos/centos:stream9
environment:
NUM_THREADS: 8 # default value for NUM_THREADS
CCACHE_DIR: "/velox/.ccache"
Expand Down
6 changes: 3 additions & 3 deletions scripts/adapters.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# Build the test and build container for presto_cpp
ARG image=ghcr.io/facebookincubator/velox-dev:centos8
ARG image=ghcr.io/facebookincubator/velox-dev:centos9
FROM $image
ARG cpu_target=avx
ENV CPU_TARGET=$cpu_target

COPY scripts/setup-adapters.sh /
RUN mkdir build && ( cd build && source /opt/rh/gcc-toolset-9/enable && \
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

# install miniforge
Expand All @@ -41,5 +41,5 @@ ENV HADOOP_HOME=/usr/local/hadoop \
LIBHDFS3_CONF=/velox/scripts/hdfs-client.xml \
PATH=/usr/local/hadoop/bin:${PATH}

ENTRYPOINT ["/bin/bash", "-c", "source /opt/rh/gcc-toolset-9/enable && exec \"$@\"", "--"]
ENTRYPOINT ["/bin/bash", "-c", "source /opt/rh/gcc-toolset-12/enable && exec \"$@\"", "--"]
CMD ["/bin/bash"]
22 changes: 0 additions & 22 deletions scripts/centos-8-stream.dockerfile

This file was deleted.

17 changes: 8 additions & 9 deletions scripts/centos.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,24 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# Build the test and build container for presto_cpp
ARG image=quay.io/centos/centos:stream8
ARG image=quay.io/centos/centos:stream9
FROM $image
ARG cpu_target=avx
ENV CPU_TARGET=$cpu_target

COPY scripts/setup-helper-functions.sh /
COPY scripts/setup-centos8.sh /
COPY scripts/setup-centos9.sh /
# The removal of the build dir has to happen in the same layer as the build
# to minimize the image size. gh & jq are required for CI
RUN mkdir build && ( cd build && bash /setup-centos8.sh ) && rm -rf build && \
RUN mkdir build && ( cd build && bash /setup-centos9.sh ) && rm -rf build && \
dnf install -y -q 'dnf-command(config-manager)' && \
dnf config-manager --add-repo 'https://cli.github.com/packages/rpm/gh-cli.repo' && \
dnf install -y -q gh jq python39 && \
dnf clean all && \
alternatives --remove python3 /usr/bin/python3.6
dnf install -y -q gh jq && \
dnf clean all


ENV CC=/opt/rh/gcc-toolset-9/root/bin/gcc \
CXX=/opt/rh/gcc-toolset-9/root/bin/g++
ENV CC=/opt/rh/gcc-toolset-12/root/bin/gcc \
CXX=/opt/rh/gcc-toolset-12/root/bin/g++

ENTRYPOINT ["/bin/bash", "-c", "source /opt/rh/gcc-toolset-9/enable && exec \"$@\"", "--"]
ENTRYPOINT ["/bin/bash", "-c", "source /opt/rh/gcc-toolset-12/enable && exec \"$@\"", "--"]
CMD ["/bin/bash"]
25 changes: 0 additions & 25 deletions scripts/circleci-container.dockfile

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/prestojava-container.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.
# Build the test and build container for presto_cpp
#
FROM ghcr.io/facebookincubator/velox-dev:centos8
FROM ghcr.io/facebookincubator/velox-dev:centos9

ARG PRESTO_VERSION=0.286

Expand Down
10 changes: 5 additions & 5 deletions scripts/setup-adapters.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function install_gcs-sdk-cpp {
github_checkout abseil/abseil-cpp 20240116.2 --depth 1
cmake_install \
-DABSL_BUILD_TESTING=OFF \
-DCMAKE_CXX_STANDARD=14 \
-DCMAKE_CXX_STANDARD=17 \
-DABSL_PROPAGATE_CXX_STD=ON \
-DABSL_ENABLE_INSTALL=ON

Expand Down Expand Up @@ -169,12 +169,12 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then
# Dependencies of Azure Storage Blob cpp
apt install -y openssl
else # Assume Fedora/CentOS
yum -y install libxml2-devel libgsasl-devel libuuid-devel
dnf -y install libxml2-devel libgsasl-devel libuuid-devel krb5-devel
# Dependencies of GCS, probably a workaround until the docker image is rebuilt
yum -y install curl-devel c-ares-devel
dnf -y install npm curl-devel c-ares-devel
# Dependencies of Azure Storage Blob Cpp
yum -y install perl-IPC-Cmd
yum -y install openssl
dnf -y install perl-IPC-Cmd
dnf -y install openssl
fi
fi

Expand Down
Loading
Loading