|
| 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 | +FROM wch1/r-debug:latest |
| 19 | + |
| 20 | +# Installs C++ toolchain and dependencies |
| 21 | +RUN apt-get update -y -q && \ |
| 22 | + apt-get install -y -q --no-install-recommends \ |
| 23 | + autoconf \ |
| 24 | + bison \ |
| 25 | + ca-certificates \ |
| 26 | + ccache \ |
| 27 | + cmake \ |
| 28 | + flex \ |
| 29 | + g++ \ |
| 30 | + gcc \ |
| 31 | + git \ |
| 32 | + libbenchmark-dev \ |
| 33 | + libboost-filesystem-dev \ |
| 34 | + libboost-regex-dev \ |
| 35 | + libboost-system-dev \ |
| 36 | + libbrotli-dev \ |
| 37 | + libbz2-dev \ |
| 38 | + libdouble-conversion-dev \ |
| 39 | + libgflags-dev \ |
| 40 | + libgoogle-glog-dev \ |
| 41 | + liblz4-dev \ |
| 42 | + liblzma-dev \ |
| 43 | + libre2-dev \ |
| 44 | + libsnappy-dev \ |
| 45 | + libssl-dev \ |
| 46 | + libzstd-dev \ |
| 47 | + ninja-build \ |
| 48 | + pkg-config \ |
| 49 | + rapidjson-dev \ |
| 50 | + thrift-compiler \ |
| 51 | + tzdata && \ |
| 52 | + apt-get clean && rm -rf /var/lib/apt/lists* |
| 53 | + |
| 54 | +# The following dependencies will be downloaded due to missing/invalid packages |
| 55 | +# provided by the distribution: |
| 56 | +# - libc-ares-dev does not install CMake config files |
| 57 | +# - flatbuffer is not packaged |
| 58 | +# - libgtest-dev only provide sources |
| 59 | +# - libprotobuf-dev only provide sources |
| 60 | +# - thrift is too old |
| 61 | +ENV CMAKE_ARGS="-DThrift_SOURCE=BUNDLED \ |
| 62 | +-DFlatbuffers_SOURCE=BUNDLED \ |
| 63 | +-DGTest_SOURCE=BUNDLED \ |
| 64 | +-Dc-ares_SOURCE=BUNDLED \ |
| 65 | +-DgRPC_SOURCE=BUNDLED \ |
| 66 | +-DProtobuf_SOURCE=BUNDLED ${CMAKE_ARGS}" |
| 67 | + |
| 68 | +# Prioritize system packages and local installation |
| 69 | +ENV ARROW_DEPENDENCY_SOURCE=SYSTEM \ |
| 70 | + ARROW_FLIGHT=OFF \ |
| 71 | + ARROW_GANDIVA=OFF \ |
| 72 | + ARROW_HDFS=OFF \ |
| 73 | + ARROW_ORC=OFF \ |
| 74 | + ARROW_PARQUET=ON \ |
| 75 | + ARROW_PLASMA=OFF \ |
| 76 | + ARROW_USE_ASAN=OFF \ |
| 77 | + ARROW_USE_UBSAN=OFF \ |
| 78 | + ARROW_NO_DEPRECATED_API=ON \ |
| 79 | + ARROW_INSTALL_NAME_RPATH=OFF \ |
| 80 | + ARROW_WITH_BZ2=OFF \ |
| 81 | + ARROW_WITH_ZSTD=OFF \ |
| 82 | + ARROW_R_DEV=TRUE |
| 83 | + |
| 84 | +# Ensure parallel R package installation |
| 85 | +RUN printf "options(Ncpus = parallel::detectCores(), repos = 'https://demo.rstudiopm.com/all/__linux__/bionic/latest')\n" >> /etc/R/Rprofile.site |
| 86 | +# Also ensure parallel compilation of each individual package |
| 87 | +RUN printf "MAKEFLAGS=-j8\n" >> /usr/lib/R/etc/Makeconf |
| 88 | + |
| 89 | +CMD ["/bin/bash", "-c", "/arrow/ci/docker_build_cpp.sh && \ |
| 90 | + /arrow/ci/docker_build_r_sanitizer.sh"] |
0 commit comments