Copilot commented on code in PR #12690: URL: https://github.com/apache/gluten/pull/12690#discussion_r3720124884
########## dev/docker/cudf/Dockerfile.centos-9-jdk17-cuda13.1-cudf: ########## @@ -0,0 +1,41 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +FROM quay.io/centos/centos:stream9 + +ARG JAVA_VERSION=17 + +ENV JAVA_HOME=/usr/lib/jvm/java-${JAVA_VERSION}-openjdk +ENV PATH=$JAVA_HOME/bin:$PATH +ENV CUDA_ARCHITECTURES=75 +ENV LD_LIBRARY_PATH=/opt/gluten/ep/build-velox/build/velox_ep/_build/release/_deps/curl-build/lib:$LD_LIBRARY_PATH +ENV CC=/opt/rh/gcc-toolset-14/root/bin/gcc \ + CXX=/opt/rh/gcc-toolset-14/root/bin/g++ + +RUN dnf config-manager --add-repo "https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64/cuda-rhel9.repo" && \ + dnf update -y && \ + dnf install -y sudo patch java-${JAVA_VERSION}-openjdk-devel maven perl git gcc-toolset-14 cuda-toolkit-13-1 && \ + dnf autoremove -y && dnf clean all && \ + git clone --depth=1 https://github.com/apache/gluten /opt/gluten && \ + cd /opt/gluten && \ + source /opt/rh/gcc-toolset-14/enable && \ + bash ./dev/buildbundle-veloxbe.sh --run_setup_script=ON --build_arrow=ON --spark_version=3.5 --build_tests=ON --build_benchmarks=ON --enable_s3=ON --enable_gcs=ON --enable_abfs=ON --enable_gpu=ON && \ Review Comment: `RUN` commands use `/bin/sh -c` by default, where `source` is not guaranteed to exist (often only available in bash). This can break the build on CentOS Stream 9. Use POSIX dot (`. /opt/rh/gcc-toolset-14/enable`) or run the whole sequence under bash (e.g., `bash -lc ...`) so enabling the toolset reliably affects the subsequent build command. ########## dev/docker/cudf/Dockerfile.centos-9-jdk17-cuda13.1-cudf: ########## @@ -0,0 +1,41 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +FROM quay.io/centos/centos:stream9 + +ARG JAVA_VERSION=17 + +ENV JAVA_HOME=/usr/lib/jvm/java-${JAVA_VERSION}-openjdk +ENV PATH=$JAVA_HOME/bin:$PATH +ENV CUDA_ARCHITECTURES=75 +ENV LD_LIBRARY_PATH=/opt/gluten/ep/build-velox/build/velox_ep/_build/release/_deps/curl-build/lib:$LD_LIBRARY_PATH +ENV CC=/opt/rh/gcc-toolset-14/root/bin/gcc \ + CXX=/opt/rh/gcc-toolset-14/root/bin/g++ + +RUN dnf config-manager --add-repo "https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64/cuda-rhel9.repo" && \ + dnf update -y && \ + dnf install -y sudo patch java-${JAVA_VERSION}-openjdk-devel maven perl git gcc-toolset-14 cuda-toolkit-13-1 && \ + dnf autoremove -y && dnf clean all && \ + git clone --depth=1 https://github.com/apache/gluten /opt/gluten && \ + cd /opt/gluten && \ + source /opt/rh/gcc-toolset-14/enable && \ + bash ./dev/buildbundle-veloxbe.sh --run_setup_script=ON --build_arrow=ON --spark_version=3.5 --build_tests=ON --build_benchmarks=ON --enable_s3=ON --enable_gcs=ON --enable_abfs=ON --enable_gpu=ON && \ + rm -rf /opt/gluten && \ Review Comment: `LD_LIBRARY_PATH` is set to a build output inside `/opt/gluten`, but `/opt/gluten` is deleted later in the same image build. That makes the environment variable point to a non-existent path at runtime and can also mask real dynamic-link errors. Either avoid setting this globally, or copy/install the needed runtime libraries into a stable location (and point `LD_LIBRARY_PATH` there) before removing `/opt/gluten`. ########## dev/docker/cudf/Dockerfile.centos-9-jdk17-cuda13.1-cudf: ########## @@ -0,0 +1,41 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +FROM quay.io/centos/centos:stream9 + +ARG JAVA_VERSION=17 + +ENV JAVA_HOME=/usr/lib/jvm/java-${JAVA_VERSION}-openjdk +ENV PATH=$JAVA_HOME/bin:$PATH +ENV CUDA_ARCHITECTURES=75 +ENV LD_LIBRARY_PATH=/opt/gluten/ep/build-velox/build/velox_ep/_build/release/_deps/curl-build/lib:$LD_LIBRARY_PATH Review Comment: `LD_LIBRARY_PATH` is set to a build output inside `/opt/gluten`, but `/opt/gluten` is deleted later in the same image build. That makes the environment variable point to a non-existent path at runtime and can also mask real dynamic-link errors. Either avoid setting this globally, or copy/install the needed runtime libraries into a stable location (and point `LD_LIBRARY_PATH` there) before removing `/opt/gluten`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
