This is an automated email from the ASF dual-hosted git repository.

yuanzhou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git


The following commit(s) were added to refs/heads/main by this push:
     new 834eee4dd4 [GLUTEN-9243][VL] Improve cuda image build (#9449)
834eee4dd4 is described below

commit 834eee4dd42fda3fa0ef77073d3bbdb65123e069
Author: Yuan <[email protected]>
AuthorDate: Wed Apr 30 07:52:38 2025 +0100

    [GLUTEN-9243][VL] Improve cuda image build (#9449)
    
    Improve cuda image build and reduce image size
---
 .github/workflows/docker_image.yml | 11 ++++++++---
 dev/docker/cudf/Dockerfile         |  9 ++++-----
 ep/build-velox/src/build_velox.sh  |  4 +++-
 3 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/.github/workflows/docker_image.yml 
b/.github/workflows/docker_image.yml
index 3403ab762d..cfc9e79297 100644
--- a/.github/workflows/docker_image.yml
+++ b/.github/workflows/docker_image.yml
@@ -62,12 +62,18 @@ jobs:
 
   build-centos-9-jdk8-cudf:
     if: ${{ startsWith(github.repository, 'apache/') }}
-    runs-on: ubuntu-latest
+    runs-on: ubuntu-22.04
 
     steps:
+      - name: "node-cleanup" # by default the free runner does not have enough 
disk space
+        run: |
+          sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc 
/opt/hostedtoolcache/CodeQL
+          sudo docker image prune --all --force
+          sudo docker builder prune -a
+      - run: df -h | sort -k 5 -nr # check disk space for debug
+
       - name: Checkout repository
         uses: actions/checkout@v4
-
       - name: Set up Docker Buildx
         uses: docker/setup-buildx-action@v3
 
@@ -296,7 +302,6 @@ jobs:
       - build-centos-8-jdk8
       - build-centos-8-jdk11
       - build-centos-8-jdk17
-      - build-centos-9-jdk8-cudf
     steps:
       - name: Download digests
         uses: actions/download-artifact@v4
diff --git a/dev/docker/cudf/Dockerfile b/dev/docker/cudf/Dockerfile
index 6e77b049af..e2bc136452 100644
--- a/dev/docker/cudf/Dockerfile
+++ b/dev/docker/cudf/Dockerfile
@@ -1,9 +1,7 @@
 FROM ghcr.io/facebookincubator/velox-dev:adapters
 RUN yum install -y sudo patch maven perl
-# After the base docker image updated, don't need to install cmake
-RUN pip install cmake==3.30.4 && ln -sf /usr/local/bin/cmake /usr/bin
 
-RUN git clone -b cudf --depth=1 https://github.com/apache/incubator-gluten 
/opt/gluten
+RUN git clone --depth=1 -b cudf https://github.com/apache/incubator-gluten 
/opt/gluten
 
 # Install spark to folder /opt
 RUN cd /opt/gluten/.github/workflows/util/ && ./install_spark_resources.sh 3.4
@@ -12,7 +10,8 @@ ENV PATH=$SPARK_HOME/bin:$PATH
 ENV CUDA_ARCHITECTURES=70
 
 WORKDIR /opt/gluten
-RUN ./dev/buildbundle-veloxbe.sh --run_setup_script=ON --build_arrow=ON 
--spark_version=3.4 --enable_gpu=ON && \
-    touch cudf.sql && echo "select o_orderkey from orders order by 
o_orderkey;" > cudf.sql
+RUN bash ./dev/buildbundle-veloxbe.sh --run_setup_script=OFF --build_arrow=ON 
--spark_version=3.4 --enable_gpu=ON && \
+    touch cudf.sql && echo "select o_orderkey from orders order by 
o_orderkey;" > cudf.sql && rm -rf /opt/gluten
 
 # You can try the data in folder 
backends-velox/src/test/resources/tpch-data-parquet
+
diff --git a/ep/build-velox/src/build_velox.sh 
b/ep/build-velox/src/build_velox.sh
index 9239156ced..aed5225ede 100755
--- a/ep/build-velox/src/build_velox.sh
+++ b/ep/build-velox/src/build_velox.sh
@@ -26,7 +26,7 @@ ENABLE_GCS=OFF
 ENABLE_HDFS=OFF
 # Enable ABFS connector.
 ENABLE_ABFS=OFF
-
+# Enable GPU support
 ENABLE_GPU=OFF
 # CMake build type for Velox.
 BUILD_TYPE=release
@@ -129,6 +129,7 @@ function compile {
   fi
   if [ $ENABLE_GPU == "ON" ]; then
     # the cuda default options are for Centos9 image from Meta
+    echo "enable GPU support."
     COMPILE_OPTION="$COMPILE_OPTION -DVELOX_ENABLE_GPU=ON 
-DVELOX_ENABLE_CUDF=ON -DCMAKE_CUDA_ARCHITECTURES=70 
-DCMAKE_CUDA_COMPILER=/usr/local/cuda-12.8/bin/nvcc"
   fi
   if [ -n "${GLUTEN_VCPKG_ENABLED:-}" ]; then
@@ -195,6 +196,7 @@ echo "ENABLE_S3=${ENABLE_S3}"
 echo "ENABLE_GCS=${ENABLE_GCS}"
 echo "ENABLE_HDFS=${ENABLE_HDFS}"
 echo "ENABLE_ABFS=${ENABLE_ABFS}"
+echo "ENABLE_GPU=${ENABLE_GPU}"
 echo "BUILD_TYPE=${BUILD_TYPE}"
 
 cd ${VELOX_HOME}


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to