Apache DataFusion SQL Query Engine
ARROW-1455 [Python] Add Dockerfile for validating Dask integration
Heimir Sverrisson89daacc3cd9d
diff --git a/dev/dask_integration.sh b/dev/dask_integration.shnew file mode 100755index 0000000000..d344328b6a--- /dev/null+++ b/dev/dask_integration.sh@@ -0,0 +1,21 @@+#!/usr/bin/env bash+#+# 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.+#++# Pass the service name to run_docker_compose.sh+# Which validates environment and runs the service+exec "$(dirname ${BASH_SOURCE})"/run_docker_compose.sh dask_integrationdiff --git a/dev/dask_integration/Dockerfile b/dev/dask_integration/Dockerfilenew file mode 100644index 0000000000..f72ef8ca0d--- /dev/null+++ b/dev/dask_integration/Dockerfile@@ -0,0 +1,88 @@+#+# 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:14.04+ADD . /apache-arrow+WORKDIR /apache-arrow+# Basic OS utilities+RUN apt-get update && apt-get install -y \+ wget \+ git \+ gcc \+ g+++# This will install conda in /home/ubuntu/miniconda+RUN wget -O /tmp/miniconda.sh \+ https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && \+ bash /tmp/miniconda.sh -b -p /home/ubuntu/miniconda && \+ rm /tmp/miniconda.sh+# Create Conda environment+ENV PATH="/home/ubuntu/miniconda/bin:${PATH}"+RUN conda create -y -q -n test-environment \+ python=3.6+# Install dependencies+RUN conda install -c conda-forge \+ numpy \+ pandas \+ bcolz \+ blosc \+ bokeh \+ boto3 \+ chest \+ cloudpickle \+ coverage \+ cytoolz \+ distributed \+ graphviz \+ h5py \+ ipython \+ partd \+ psutil \+ "pytest<=3.1.1" \+ scikit-image \+ scikit-learn \+ scipy \+ sqlalchemy \+ toolz+# install pytables from defaults for now+RUN conda install pytables++RUN pip install -q git+https://github.com/dask/partd --upgrade --no-deps+RUN pip install -q git+https://github.com/dask/zict --upgrade --no-deps+RUN pip install -q git+https://github.com/dask/distributed --upgrade --no-deps+RUN pip install -q git+https://github.com/mrocklin/sparse --upgrade --no-deps+RUN pip install -q git+https://github.com/dask/s3fs --upgrade --no-deps++RUN conda install -q -c conda-forge numba cython+RUN pip install -q git+https://github.com/dask/fastparquet++RUN pip install -q \+ cachey \+ graphviz \+ moto \+ pyarrow \+ --upgrade --no-deps++RUN pip install -q \+ cityhash \+ flake8 \+ mmh3 \+ pandas_datareader \+ pytest-xdist \+ xxhash \+ pycodestyle++CMD arrow/dev/dask_integration/dask_integration.sh+diff --git a/dev/dask_integration/dask_integration.sh b/dev/dask_integration/dask_integration.shnew file mode 100755index 0000000000..f5a24e462b--- /dev/null+++ b/dev/dask_integration/dask_integration.sh@@ -0,0 +1,49 @@+#!/usr/bin/env bash+#+# 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.+#++# Set up environment and working directory+cd /apache-arrow++export ARROW_BUILD_TYPE=release+export ARROW_HOME=$(pwd)/dist+export PARQUET_HOME=$(pwd)/dist+CONDA_BASE=/home/ubuntu/miniconda+export LD_LIBRARY_PATH=$(pwd)/dist/lib:${CONDA_BASE}/lib:${LD_LIBRARY_PATH}++# Allow for --user Python installation inside Docker+export HOME=$(pwd)++# Clean up and get the dask master branch from github+rm -rf dask .local+export GIT_COMMITTER_NAME="Nobody"+export GIT_COMMITTER_EMAIL="[email protected]"+git clone https://github.com/dask/dask.git+pushd dask+pip install --user -e .[complete]+# Verify integrity of the installed dask dataframe code+py.test dask/dataframe/tests/test_dataframe.py+popd++# Run the integration test+pushd arrow/python/testing+py.test dask_tests+popd++pushd dask/dask/dataframe/io+py.test tests/test_parquet.py+popddiff --git a/dev/docker-compose.yml b/dev/docker-compose.ymlindex 7bd2cd4412..4b90148940 100644--- a/dev/docker-compose.yml+++ b/dev/docker-compose.yml@@ -28,3 +28,8 @@ services:- "4000:4000"volumes:- ../..:/apache-arrow+ dask_integration:+ build:+ context: dask_integration+ volumes:+ - ../..:/apache-arrowdiff --git a/dev/run_docker_compose.sh b/dev/run_docker_compose.shindex f46879ed1e..681a3a75ff 100755--- a/dev/run_docker_compose.sh+++ b/dev/run_docker_compose.sh@@ -37,4 +37,4 @@ fiGID=$(id -g ${USERNAME})docker-compose -f arrow/dev/docker-compose.yml run \- -u "${UID}:${GID}" "${1}"+ --rm -u "${UID}:${GID}" "${1}"