This is an automated email from the ASF dual-hosted git repository.
apitrou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new b0422e5feb ARROW-17435: [CI][Python][CUDA] Install Numba for CUDA
interop tests (#13899)
b0422e5feb is described below
commit b0422e5feb6d335f8e726f6221d42f2a044cd02c
Author: Antoine Pitrou <[email protected]>
AuthorDate: Wed Aug 17 15:37:16 2022 +0200
ARROW-17435: [CI][Python][CUDA] Install Numba for CUDA interop tests
(#13899)
Checked locally on a Ubuntu 20.04 host with:
```
archery docker run ubuntu-cuda-python
```
Authored-by: Antoine Pitrou <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
---
.env | 1 +
ci/docker/linux-apt-python-3.dockerfile | 6 +++++
python/setup.cfg => ci/scripts/install_numba.sh | 29 +++++++++++++------------
ci/scripts/python_test.sh | 2 +-
docker-compose.yml | 6 ++---
python/setup.cfg | 2 ++
6 files changed, 28 insertions(+), 18 deletions(-)
diff --git a/.env b/.env
index e160ffad90..4aa04daab0 100644
--- a/.env
+++ b/.env
@@ -67,6 +67,7 @@ KARTOTHEK=latest
LLVM=13
MAVEN=3.5.4
NODE=16
+NUMBA=latest
NUMPY=latest
PANDAS=latest
PYTHON=3.8
diff --git a/ci/docker/linux-apt-python-3.dockerfile
b/ci/docker/linux-apt-python-3.dockerfile
index ece7cf0912..78f6a12c1c 100644
--- a/ci/docker/linux-apt-python-3.dockerfile
+++ b/ci/docker/linux-apt-python-3.dockerfile
@@ -39,6 +39,12 @@ RUN pip install \
-r arrow/python/requirements-build.txt \
-r arrow/python/requirements-test.txt
+ARG numba
+COPY ci/scripts/install_numba.sh /arrow/ci/scripts/
+RUN if [ "${numba}" != "" ]; then \
+ /arrow/ci/scripts/install_numba.sh ${numba} \
+ ; fi
+
ENV ARROW_PYTHON=ON \
ARROW_BUILD_STATIC=OFF \
ARROW_BUILD_TESTS=OFF \
diff --git a/python/setup.cfg b/ci/scripts/install_numba.sh
old mode 100644
new mode 100755
similarity index 71%
copy from python/setup.cfg
copy to ci/scripts/install_numba.sh
index 9aaad4fa56..470f291ba8
--- a/python/setup.cfg
+++ b/ci/scripts/install_numba.sh
@@ -1,3 +1,5 @@
+#!/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
@@ -15,20 +17,19 @@
# specific language governing permissions and limitations
# under the License.
-[metadata]
-license_files =
- ../LICENSE.txt
- ../NOTICE.txt
+set -e
-[build_sphinx]
-source-dir = doc/
-build-dir = doc/_build
+if [ "$#" -ne 1 ]; then
+ echo "Usage: $0 <numba version>"
+ exit 1
+fi
-[tool:pytest]
-addopts = --ignore=scripts
-filterwarnings =
- error:The SparseDataFrame:FutureWarning
+numba=$1
-[pep8]
-ignore = E211,E225,E226,E227,E402,W504
-max_line_length = 79
+if [ "${numba}" = "master" ]; then
+ pip install https://github.com/numba/numba/archive/main.tar.gz#egg=numba
+elif [ "${numba}" = "latest" ]; then
+ pip install numba
+else
+ pip install numba==${numba}
+fi
diff --git a/ci/scripts/python_test.sh b/ci/scripts/python_test.sh
index 4e2990b84d..4400eeeae6 100755
--- a/ci/scripts/python_test.sh
+++ b/ci/scripts/python_test.sh
@@ -54,4 +54,4 @@ export PYARROW_TEST_ORC
export PYARROW_TEST_PARQUET
export PYARROW_TEST_S3
-pytest -r s -v ${PYTEST_ARGS} --pyargs pyarrow
+pytest -r s ${PYTEST_ARGS} --pyargs pyarrow
diff --git a/docker-compose.yml b/docker-compose.yml
index 5755226a14..5e73311cba 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -487,7 +487,7 @@ services:
llvm: ${LLVM}
shm_size: *shm-size
ulimits: *ulimits
- environment:
+ environment: &cuda-environment
<<: *ccache
ARROW_BUILD_STATIC: "OFF"
ARROW_CUDA: "ON"
@@ -775,10 +775,10 @@ services:
- ${REPO}:${ARCH}-ubuntu-${UBUNTU}-cuda-${CUDA}-python-3
args:
base: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-cuda-${CUDA}-cpp
+ numba: ${NUMBA}
shm_size: *shm-size
environment:
- <<: *ccache
- ARROW_CUDA: "ON"
+ <<: [ *ccache, *cuda-environment ]
volumes: *ubuntu-volumes
command: &python-command >
/bin/bash -c "
diff --git a/python/setup.cfg b/python/setup.cfg
index 9aaad4fa56..062ce2745d 100644
--- a/python/setup.cfg
+++ b/python/setup.cfg
@@ -28,6 +28,8 @@ build-dir = doc/_build
addopts = --ignore=scripts
filterwarnings =
error:The SparseDataFrame:FutureWarning
+# Get a debug traceback when a test takes a really long time
+faulthandler_timeout = 300
[pep8]
ignore = E211,E225,E226,E227,E402,W504