From c5060b2c3c63edef838ac9435767f2b493bc0dca Mon Sep 17 00:00:00 2001 From: comphead Date: Tue, 16 Jul 2024 09:56:57 -0700 Subject: [PATCH 1/3] Create Comet docker file --- kube/Dockerfile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 kube/Dockerfile diff --git a/kube/Dockerfile b/kube/Dockerfile new file mode 100644 index 000000000..1a5ad467c --- /dev/null +++ b/kube/Dockerfile @@ -0,0 +1,26 @@ +FROM apache/spark:3.4.2 + +USER root + +# Installing JDK11 as the image comes with JRE +RUN apt update \ + && apt install -y git \ + && apt install -y curl \ + && apt install -y openjdk-11-jdk \ + && apt clean + +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y +ENV PATH="/root/.cargo/bin:${PATH}" +ENV RUSTFLAGS="-C debuginfo=line-tables-only -C incremental=false" +ENV SPARK_VERSION=3.4 +ENV SCALA_VERSION=2.12 + +# Pick the JDK instead of JRE to compile Comet +RUN cd /opt \ + && git clone https://github.com/apache/datafusion-comet.git \ + && cd datafusion-comet \ + && JAVA_HOME=$(readlink -f $(which javac) | sed "s/\/bin\/javac//") make release PROFILES="-Pspark-$SPARK_VERSION -Pscala-$SCALA_VERSION" + +RUN cp /opt/datafusion-comet/spark/target/comet-spark-spark${SPARK_VERSION}_$SCALA_VERSION-0.1.0-SNAPSHOT.jar $SPARK_HOME/jars + +USER ${spark_uid} \ No newline at end of file From 8be9630c27f12fadb5a3147216f9c802ae91558b Mon Sep 17 00:00:00 2001 From: comphead Date: Tue, 16 Jul 2024 12:34:29 -0700 Subject: [PATCH 2/3] Create Comet docker file. Comments --- kube/Dockerfile | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/kube/Dockerfile b/kube/Dockerfile index 1a5ad467c..d6244c113 100644 --- a/kube/Dockerfile +++ b/kube/Dockerfile @@ -1,4 +1,21 @@ -FROM apache/spark:3.4.2 +# +# 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 apache/spark:3.4.2 AS builder USER root @@ -21,6 +38,8 @@ RUN cd /opt \ && cd datafusion-comet \ && JAVA_HOME=$(readlink -f $(which javac) | sed "s/\/bin\/javac//") make release PROFILES="-Pspark-$SPARK_VERSION -Pscala-$SCALA_VERSION" -RUN cp /opt/datafusion-comet/spark/target/comet-spark-spark${SPARK_VERSION}_$SCALA_VERSION-0.1.0-SNAPSHOT.jar $SPARK_HOME/jars - -USER ${spark_uid} \ No newline at end of file +FROM apache/spark:3.4.2 +ENV SPARK_VERSION=3.4 +ENV SCALA_VERSION=2.12 +USER root +COPY --from=builder /opt/datafusion-comet/spark/target/comet-spark-spark${SPARK_VERSION}_$SCALA_VERSION-0.1.0-SNAPSHOT.jar $SPARK_HOME/jars \ No newline at end of file From ec4c5737c6e1f5f40e48eb7718daffa089ee89fa Mon Sep 17 00:00:00 2001 From: comphead Date: Wed, 17 Jul 2024 08:22:10 -0700 Subject: [PATCH 3/3] Create Comet docker file. Comments --- kube/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kube/Dockerfile b/kube/Dockerfile index d6244c113..ed4e7aa03 100644 --- a/kube/Dockerfile +++ b/kube/Dockerfile @@ -15,7 +15,7 @@ # limitations under the License. # -FROM apache/spark:3.4.2 AS builder +FROM apache/spark:3.4.3 AS builder USER root @@ -38,7 +38,7 @@ RUN cd /opt \ && cd datafusion-comet \ && JAVA_HOME=$(readlink -f $(which javac) | sed "s/\/bin\/javac//") make release PROFILES="-Pspark-$SPARK_VERSION -Pscala-$SCALA_VERSION" -FROM apache/spark:3.4.2 +FROM apache/spark:3.4.3 ENV SPARK_VERSION=3.4 ENV SCALA_VERSION=2.12 USER root