Skip to content

Commit b0422e5

Browse files
authored
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]>
1 parent 42ed37e commit b0422e5

6 files changed

Lines changed: 48 additions & 4 deletions

File tree

‎.env‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ KARTOTHEK=latest
6767
LLVM=13
6868
MAVEN=3.5.4
6969
NODE=16
70+
NUMBA=latest
7071
NUMPY=latest
7172
PANDAS=latest
7273
PYTHON=3.8

‎ci/docker/linux-apt-python-3.dockerfile‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ RUN pip install \
3939
-r arrow/python/requirements-build.txt \
4040
-r arrow/python/requirements-test.txt
4141

42+
ARG numba
43+
COPY ci/scripts/install_numba.sh /arrow/ci/scripts/
44+
RUN if [ "${numba}" != "" ]; then \
45+
/arrow/ci/scripts/install_numba.sh ${numba} \
46+
; fi
47+
4248
ENV ARROW_PYTHON=ON \
4349
ARROW_BUILD_STATIC=OFF \
4450
ARROW_BUILD_TESTS=OFF \

‎ci/scripts/install_numba.sh‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Licensed to the Apache Software Foundation (ASF) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The ASF licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
set -e
21+
22+
if [ "$#" -ne 1 ]; then
23+
echo "Usage: $0 <numba version>"
24+
exit 1
25+
fi
26+
27+
numba=$1
28+
29+
if [ "${numba}" = "master" ]; then
30+
pip install https://github.com/numba/numba/archive/main.tar.gz#egg=numba
31+
elif [ "${numba}" = "latest" ]; then
32+
pip install numba
33+
else
34+
pip install numba==${numba}
35+
fi

‎ci/scripts/python_test.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ export PYARROW_TEST_ORC
5454
export PYARROW_TEST_PARQUET
5555
export PYARROW_TEST_S3
5656

57-
pytest -r s -v ${PYTEST_ARGS} --pyargs pyarrow
57+
pytest -r s ${PYTEST_ARGS} --pyargs pyarrow

‎docker-compose.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ services:
487487
llvm: ${LLVM}
488488
shm_size: *shm-size
489489
ulimits: *ulimits
490-
environment:
490+
environment: &cuda-environment
491491
<<: *ccache
492492
ARROW_BUILD_STATIC: "OFF"
493493
ARROW_CUDA: "ON"
@@ -775,10 +775,10 @@ services:
775775
- ${REPO}:${ARCH}-ubuntu-${UBUNTU}-cuda-${CUDA}-python-3
776776
args:
777777
base: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-cuda-${CUDA}-cpp
778+
numba: ${NUMBA}
778779
shm_size: *shm-size
779780
environment:
780-
<<: *ccache
781-
ARROW_CUDA: "ON"
781+
<<: [ *ccache, *cuda-environment ]
782782
volumes: *ubuntu-volumes
783783
command: &python-command >
784784
/bin/bash -c "

‎python/setup.cfg‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ build-dir = doc/_build
2828
addopts = --ignore=scripts
2929
filterwarnings =
3030
error:The SparseDataFrame:FutureWarning
31+
# Get a debug traceback when a test takes a really long time
32+
faulthandler_timeout = 300
3133

3234
[pep8]
3335
ignore = E211,E225,E226,E227,E402,W504

0 commit comments

Comments
 (0)