bobtins commented on a change in pull request #1928:
URL: https://github.com/apache/arrow-datafusion/pull/1928#discussion_r827407028



##########
File path: benchmarks/db-benchmark/db-benchmark.dockerfile
##########
@@ -0,0 +1,94 @@
+# 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 ubuntu
+ARG DEBIAN_FRONTEND=noninteractive
+
+RUN apt-get update && \
+    apt-get install -y git build-essential
+
+# Install R, curl, and python deps
+RUN apt-get -y install --no-install-recommends --no-install-suggests \
+    ca-certificates software-properties-common gnupg2 gnupg1 \
+    && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 
E298A3A825C0D65DFD57CBB651716619E084DAB9 \
+    && add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu 
bionic-cran35/' \
+    && apt-get -y install r-base \
+    && apt-get -y install curl \
+    && apt-get -y install python3.8 \
+    && apt-get -y install python3-pip
+
+# Install R libraries
+RUN R -e "install.packages('data.table',dependencies=TRUE, 
repos='http://cran.rstudio.com/')" \
+    && R -e "install.packages('dplyr',dependencies=TRUE, 
repos='http://cran.rstudio.com/')"
+
+# Install Rust
+RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
+ENV PATH="/root/.cargo/bin:${PATH}"
+
+# Clone db-benchmark and download data
+RUN git clone https://github.com/h2oai/db-benchmark \
+    && cd db-benchmark \
+    && Rscript _data/groupby-datagen.R 1e7 1e2 0 0 \
+    && Rscript _data/join-datagen.R 1e7 0 0 0 \
+    && mkdir data \
+    && mv G1_1e7_1e2_0_0.csv data \
+    && mv J1_1e7_1e1_0_0.csv data \
+    && mv J1_1e7_1e4_0_0.csv data \
+    && mv J1_1e7_1e7_0_0.csv data \
+    && mv J1_1e7_NA_0_0.csv data \
+    && cd ..
+
+# Clone datafusion-python and build python library
+# Not sure if the wheel will be the same on all computers
+RUN git clone https://github.com/datafusion-contrib/datafusion-python \
+    && cd datafusion-python && git reset --hard 
368b50ed9662d5e93c70b539f94cceace685265e \
+    && python3 -m pip install pip \
+    && python3 -m pip install pandas \
+    && python3 -m pip install -r requirements.txt \
+    && cd ..
+
+# Copy local arrow-datafusion
+COPY . arrow-datafusion
+
+# 1. datafusion-python that builds from datafusion version referenced 
datafusion-python
+RUN cd datafusion-python \
+    && maturin build --release \
+    && python3 -m pip install 
target/wheels/datafusion-0.4.0-cp36-abi3-linux_aarch64.whl \

Review comment:
       ```suggestion
       && case "${TARGETPLATFORM}" in \
            */amd64)  CPUARCH=x86_64  ;; \
            */arm64)  CPUARCH=aarch64  ;; \
            *) exit 1 ;; \
       esac \
       && python3 -m pip install 
target/wheels/datafusion-0.4.0-cp36-abi3-linux_${CPUARCH}.whl \
       && case "${TARGETPLATFORM}" in \
            */amd64)  CPUARCH=x86_64  ;; \
            */arm64)  CPUARCH=aarch64  ;; \
            *) exit 1 ;; \
       esac \
       && python3 -m pip install 
target/wheels/datafusion-0.4.0-cp36-abi3-linux_${CPUARCH}.whl \
   ```




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