1+ # Licensed to the Apache Software Foundation (ASF) under one or more
2+ # contributor license agreements. See the NOTICE file distributed with
3+ # this work for additional information regarding copyright ownership.
4+ # The ASF licenses this file to You under the Apache License, Version 2.0
5+ # (the "License"); you may not use this file except in compliance with
6+ # the License. You may obtain a copy of the License at
7+ #
8+ # http://www.apache.org/licenses/LICENSE-2.0
9+ #
10+ # Unless required by applicable law or agreed to in writing, software
11+ # distributed under the License is distributed on an "AS IS" BASIS,
12+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ # See the License for the specific language governing permissions and
14+ # limitations under the License.
15+
16+ FROM ubuntu:22.04
17+
18+ ENV DEBIAN_FRONTEND=noninteractive
19+ ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-arm64
20+ ENV PATH=$JAVA_HOME/bin:$PATH
21+
22+ RUN apt-get update && apt-get install -y \
23+ sudo git build-essential cmake ninja-build \
24+ python3 curl ccache wget unzip \
25+ openjdk-17-jdk maven \
26+ && rm -rf /var/lib/apt/lists/*
27+
28+ RUN git clone --depth=1 https://github.com/apache/incubator-gluten.git /opt/gluten
29+
30+ WORKDIR /opt/gluten
31+
32+ # Build Velox dependencies with Arrow enabled
33+ RUN bash ./dev/builddeps-veloxbe.sh \
34+ --run_setup_script=ON \
35+ build_arrow
36+
37+ # Download Maven dependencies for common Spark versions
38+ # This pre-populates the Maven cache with all necessary dependencies
39+ RUN set -ex; \
40+ export MVN_CMD="build/mvn -ntp"; \
41+
42+ # Spark 4.1
43+ $MVN_CMD -Pjava-17,scala-2.13,spark-4.1,backends-velox,hadoop-3.3,spark-ut,delta \
44+ dependency:go-offline -DskipTests || true; \
45+
46+ # Spark 4.0
47+ $MVN_CMD -Pjava-17,scala-2.13,spark-4,backends-velox,hadoop-3.3,spark-ut \
48+ -Piceberg,iceberg-test,delta,paimon \
49+ dependency:go-offline -DskipTests || true; \
50+
51+ # Spark 3.5
52+ $MVN_CMD -Pjava-17,spark-3.5,backends-velox,hadoop-3.3,spark-ut \
53+ -Piceberg,iceberg-test,delta,paimon \
54+ dependency:go-offline -DskipTests || true; \
55+
56+ # Spark 3.4
57+ $MVN_CMD -Pjava-17,spark-3.4,backends-velox,hadoop-3.3,spark-ut \
58+ -Piceberg,iceberg-test,delta,paimon \
59+ dependency:go-offline -DskipTests || true; \
60+
61+ # Spark 3.3
62+ $MVN_CMD -Pjava-17,spark-3.3,backends-velox,hadoop-3.3,spark-ut \
63+ -Piceberg,delta,paimon \
64+ dependency:go-offline -DskipTests || true
65+
66+ WORKDIR /work
67+
68+ # Clean up build artifacts but keep m2
69+ RUN rm -rf /opt/gluten/cpp/build \
70+ && rm -rf /opt/gluten/ep/build-velox/build \
71+ && rm -rf /root/.cache/ccache
72+
73+ # Default command
74+ CMD ["/bin/bash"]
0 commit comments