]>
Commit | Line | Data |
---|---|---|
1d09f67e TL |
1 | # Licensed to the Apache Software Foundation (ASF) under one |
2 | # or more contributor license agreements. See the NOTICE file | |
3 | # distributed with this work for additional information | |
4 | # regarding copyright ownership. The ASF licenses this file | |
5 | # to you under the Apache License, Version 2.0 (the | |
6 | # "License"); you may not use this file except in compliance | |
7 | # with the License. You may obtain a copy of the License at | |
8 | # | |
9 | # http://www.apache.org/licenses/LICENSE-2.0 | |
10 | # | |
11 | # Unless required by applicable law or agreed to in writing, | |
12 | # software distributed under the License is distributed on an | |
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
14 | # KIND, either express or implied. See the License for the | |
15 | # specific language governing permissions and limitations | |
16 | # under the License. | |
17 | ||
18 | ARG base=amd64/ubuntu:20.04 | |
19 | FROM ${base} | |
20 | ARG arch | |
21 | ||
22 | SHELL ["/bin/bash", "-o", "pipefail", "-c"] | |
23 | ||
24 | RUN echo "debconf debconf/frontend select Noninteractive" | \ | |
25 | debconf-set-selections | |
26 | ||
27 | # Installs LLVM toolchain, for Gandiva and testing other compilers | |
28 | # | |
29 | # Note that this is installed before the base packages to improve iteration | |
30 | # while debugging package list with docker build. | |
31 | ARG clang_tools | |
32 | ARG llvm | |
33 | RUN if [ "${llvm}" -gt "10" ]; then \ | |
34 | apt-get update -y -q && \ | |
35 | apt-get install -y -q --no-install-recommends \ | |
36 | apt-transport-https \ | |
37 | ca-certificates \ | |
38 | gnupg \ | |
39 | wget && \ | |
40 | wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \ | |
41 | echo "deb https://apt.llvm.org/hirsute/ llvm-toolchain-hirsute-${llvm} main" > \ | |
42 | /etc/apt/sources.list.d/llvm.list && \ | |
43 | if [ "${clang_tools}" != "${llvm}" -a "${clang_tools}" -gt 10 ]; then \ | |
44 | echo "deb https://apt.llvm.org/hirsute/ llvm-toolchain-hirsute-${clang_tools} main" > \ | |
45 | /etc/apt/sources.list.d/clang-tools.list; \ | |
46 | fi \ | |
47 | fi && \ | |
48 | apt-get update -y -q && \ | |
49 | apt-get install -y -q --no-install-recommends \ | |
50 | clang-${clang_tools} \ | |
51 | clang-${llvm} \ | |
52 | clang-format-${clang_tools} \ | |
53 | clang-tidy-${clang_tools} \ | |
54 | llvm-${llvm}-dev && \ | |
55 | apt-get clean && \ | |
56 | rm -rf /var/lib/apt/lists* | |
57 | ||
58 | # Installs C++ toolchain and dependencies | |
59 | RUN apt-get update -y -q && \ | |
60 | apt-get install -y -q --no-install-recommends \ | |
61 | autoconf \ | |
62 | ca-certificates \ | |
63 | ccache \ | |
64 | cmake \ | |
65 | gdb \ | |
66 | git \ | |
67 | libbenchmark-dev \ | |
68 | libboost-filesystem-dev \ | |
69 | libboost-system-dev \ | |
70 | libbrotli-dev \ | |
71 | libbz2-dev \ | |
72 | libc-ares-dev \ | |
73 | libcurl4-openssl-dev \ | |
74 | libgflags-dev \ | |
75 | libgoogle-glog-dev \ | |
76 | libgrpc++-dev \ | |
77 | liblz4-dev \ | |
78 | libprotobuf-dev \ | |
79 | libprotoc-dev \ | |
80 | libre2-dev \ | |
81 | libsnappy-dev \ | |
82 | libssl-dev \ | |
83 | libthrift-dev \ | |
84 | libutf8proc-dev \ | |
85 | libzstd-dev \ | |
86 | make \ | |
87 | ninja-build \ | |
88 | pkg-config \ | |
89 | protobuf-compiler \ | |
90 | protobuf-compiler-grpc \ | |
91 | python3-pip \ | |
92 | rapidjson-dev \ | |
93 | tzdata \ | |
94 | wget && \ | |
95 | apt-get clean && \ | |
96 | rm -rf /var/lib/apt/lists* | |
97 | ||
98 | COPY ci/scripts/install_minio.sh /arrow/ci/scripts/ | |
99 | RUN /arrow/ci/scripts/install_minio.sh ${arch} linux latest /usr/local | |
100 | COPY ci/scripts/install_gcs_testbench.sh /arrow/ci/scripts/ | |
101 | RUN /arrow/ci/scripts/install_gcs_testbench.sh ${arch} default | |
102 | ||
103 | # Prioritize system packages and local installation | |
104 | # The following dependencies will be downloaded due to missing/invalid packages | |
105 | # provided by the distribution: | |
106 | # - libc-ares-dev does not install CMake config files | |
107 | # - flatbuffer is not packaged | |
108 | # - libgtest-dev only provide sources | |
109 | # - libprotobuf-dev only provide sources | |
110 | ENV ARROW_BUILD_TESTS=ON \ | |
111 | ARROW_DEPENDENCY_SOURCE=SYSTEM \ | |
112 | ARROW_DATASET=ON \ | |
113 | ARROW_FLIGHT=OFF \ | |
114 | ARROW_GANDIVA=ON \ | |
115 | ARROW_HDFS=ON \ | |
116 | ARROW_HOME=/usr/local \ | |
117 | ARROW_INSTALL_NAME_RPATH=OFF \ | |
118 | ARROW_NO_DEPRECATED_API=ON \ | |
119 | ARROW_ORC=ON \ | |
120 | ARROW_PARQUET=ON \ | |
121 | ARROW_PLASMA=ON \ | |
122 | ARROW_S3=ON \ | |
123 | ARROW_USE_ASAN=OFF \ | |
124 | ARROW_USE_CCACHE=ON \ | |
125 | ARROW_USE_UBSAN=OFF \ | |
126 | ARROW_WITH_BROTLI=ON \ | |
127 | ARROW_WITH_BZ2=ON \ | |
128 | ARROW_WITH_LZ4=ON \ | |
129 | ARROW_WITH_SNAPPY=ON \ | |
130 | ARROW_WITH_ZLIB=ON \ | |
131 | ARROW_WITH_ZSTD=ON \ | |
132 | AWSSDK_SOURCE=BUNDLED \ | |
133 | GTest_SOURCE=BUNDLED \ | |
134 | ORC_SOURCE=BUNDLED \ | |
135 | PARQUET_BUILD_EXAMPLES=ON \ | |
136 | PARQUET_BUILD_EXECUTABLES=ON \ | |
137 | PATH=/usr/lib/ccache/:$PATH \ | |
138 | PYTHON=python3 | |
139 | ||
140 | ARG gcc_version="" | |
141 | RUN if [ "${gcc_version}" = "" ]; then \ | |
142 | apt-get update -y -q && \ | |
143 | apt-get install -y -q --no-install-recommends \ | |
144 | g++ \ | |
145 | gcc; \ | |
146 | else \ | |
147 | if [ "${gcc_version}" -gt "10" ]; then \ | |
148 | apt-get update -y -q && \ | |
149 | apt-get install -y -q --no-install-recommends software-properties-common && \ | |
150 | add-apt-repository ppa:ubuntu-toolchain-r/volatile; \ | |
151 | fi; \ | |
152 | apt-get update -y -q && \ | |
153 | apt-get install -y -q --no-install-recommends \ | |
154 | g++-${gcc_version} \ | |
155 | gcc-${gcc_version} && \ | |
156 | update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${gcc_version} 100 && \ | |
157 | update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${gcc_version} 100 && \ | |
158 | update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 100 && \ | |
159 | update-alternatives --set cc /usr/bin/gcc && \ | |
160 | update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 100 && \ | |
161 | update-alternatives --set c++ /usr/bin/g++; \ | |
162 | fi |