rangareddy commented on code in PR #18939:
URL: https://github.com/apache/hudi/pull/18939#discussion_r3488263524


##########
hudi-notebooks/Dockerfile.spark4:
##########
@@ -0,0 +1,76 @@
+#  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.
+
+ARG SPARK_VERSION=${SPARK_VERSION:-4.0.2}
+ARG JAVA_VERSION=${JAVA_VERSION:-17}
+ARG SCALA_VERSION=${SCALA_VERSION:-2.13}
+ARG PYTHON_VERSION=${PYTHON_VERSION:-3}
+FROM 
apache/spark:$SPARK_VERSION-scala$SCALA_VERSION-java$JAVA_VERSION-python$PYTHON_VERSION-ubuntu
+
+USER root
+
+ARG SPARK_VERSION=${SPARK_VERSION:-4.0.2} \
+    HADOOP_VERSION=${HADOOP_VERSION:-3.4.1} \
+    AWS_SDK_V2_VERSION=${AWS_SDK_V2_VERSION:-2.24.6} \
+    MVN_REPO_URL=https://repo1.maven.org/maven2 \
+    HUDI_VERSION=${HUDI_VERSION:-1.1.1} \
+    SCALA_VERSION=${SCALA_VERSION:-2.13} \
+    HUDI_HOME=${HUDI_HOME:-/opt/hudi} \
+    NOTEBOOK_HOME=${NOTEBOOK_HOME:-/opt/notebooks}
+
+ENV SPARK_VERSION=$SPARK_VERSION \
+    SCALA_VERSION=$SCALA_VERSION \
+    HUDI_VERSION=$HUDI_VERSION \
+    PATH=$SPARK_HOME/bin:$PATH \
+    NOTEBOOK_HOME=$NOTEBOOK_HOME \
+    HUDI_HOME=$HUDI_HOME
+
+ARG SPARK_MINOR_VERSION=${SPARK_VERSION%.*}
+ARG HUDI_SPARK_BUNDLE=hudi-spark${SPARK_MINOR_VERSION}-bundle_$SCALA_VERSION
+ARG HUDI_SPARK_BUNDLE_JAR=$HUDI_SPARK_BUNDLE-$HUDI_VERSION.jar
+
+RUN mkdir -p ${HUDI_HOME}/${HUDI_VERSION} $NOTEBOOK_HOME && \
+    wget -O $SPARK_HOME/jars/hadoop-aws.jar \
+        
$MVN_REPO_URL/org/apache/hadoop/hadoop-aws/$HADOOP_VERSION/hadoop-aws-$HADOOP_VERSION.jar
 && \
+    wget -O $SPARK_HOME/jars/aws-sdk-bundle.jar \
+        
$MVN_REPO_URL/software/amazon/awssdk/bundle/$AWS_SDK_V2_VERSION/bundle-$AWS_SDK_V2_VERSION.jar
 && \
+    wget -O ${HUDI_HOME}/${HUDI_VERSION}/${HUDI_SPARK_BUNDLE_JAR} \
+        
$MVN_REPO_URL/org/apache/hudi/${HUDI_SPARK_BUNDLE}/${HUDI_VERSION}/${HUDI_SPARK_BUNDLE_JAR}
+
+COPY requirements.txt /tmp/requirements.txt
+COPY requirements-spark4.txt /tmp/requirements-spark4.txt
+
+RUN apt-get update && \
+    apt-get install -y --no-install-recommends python3-pip cargo && \
+    pip3 install --upgrade pip && \
+    pip3 install --no-cache-dir -r /tmp/requirements.txt && \
+    pip3 install --no-cache-dir -r /tmp/requirements-spark4.txt && \
+    ln -sf /usr/bin/python3 /usr/bin/python && \
+    apt-get clean && \
+    rm -rf /var/lib/apt/lists/* /tmp/requirements.txt 
/tmp/requirements-spark4.txt
+
+COPY notebooks/common/*.ipynb $NOTEBOOK_HOME/
+COPY notebooks/common/images/ $NOTEBOOK_HOME/images/
+COPY notebooks/spark4/utils.py $NOTEBOOK_HOME/utils.py
+COPY notebooks/spark4/*.ipynb $NOTEBOOK_HOME/
+COPY conf/spark4/ $SPARK_HOME/conf/
+COPY conf/hadoop/core-site.xml $SPARK_HOME/conf/core-site.xml
+COPY entrypoint.sh $SPARK_HOME/entrypoint.sh
+RUN chmod +x /opt/spark/entrypoint.sh

Review Comment:
   Fixed in code.



-- 
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]

Reply via email to