Skip to content

Commit 232c66e

Browse files
committed
Update CI to install numba-cuda
1 parent fc3f3b5 commit 232c66e

File tree

4 files changed

+28
-8
lines changed

4 files changed

+28
-8
lines changed

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ LLVM=18
6767
MAVEN=3.8.7
6868
NODE=20
6969
NUMBA=latest
70+
NUMBA_CUDA=latest
7071
NUMPY=latest
7172
PANDAS=latest
7273
PYTHON=3.9

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ RUN python3 -m venv ${ARROW_PYTHON_VENV} && \
3232
-r arrow/python/requirements-test.txt
3333

3434
ARG numba
35+
ARG numba_cuda
3536
COPY ci/scripts/install_numba.sh /arrow/ci/scripts/
3637
RUN if [ "${numba}" != "" ]; then \
37-
/arrow/ci/scripts/install_numba.sh ${numba} \
38+
/arrow/ci/scripts/install_numba.sh ${numba} ${numba_cuda} \
3839
; fi
3940

4041
ENV ARROW_ACERO=ON \

ci/scripts/install_numba.sh

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919

2020
set -e
2121

22-
if [ "$#" -ne 1 ]; then
23-
echo "Usage: $0 <numba version>"
22+
if [ "$#" -ne 1 ] && [ "$#" -ne 2 ]; then
23+
echo "Usage: $0 <numba version> [numba-cuda version]"
2424
exit 1
2525
fi
2626

@@ -41,3 +41,17 @@ elif [ "${numba}" = "latest" ]; then
4141
else
4242
pip install "numba==${numba}"
4343
fi
44+
45+
if [ "$#" -eq 1 ]; then
46+
exit 0
47+
fi
48+
49+
numba_cuda=$2
50+
51+
if [ "${numba_cuda}" = "master" ]; then
52+
pip install https://github.com/NVIDIA/numba-cuda/archive/main.tar.gz#egg=numba-cuda
53+
elif [ "${numba_cuda}" = "latest" ]; then
54+
pip install numba-cuda
55+
else
56+
pip install "numba-cuda==${numba_cuda}"
57+
fi

docker-compose.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -560,10 +560,11 @@ services:
560560

561561
ubuntu-cuda-cpp:
562562
# Usage:
563-
# docker compose build cuda-cpp
564-
# docker compose run --rm cuda-cpp
563+
# docker compose build ubuntu-cuda-cpp
564+
# docker compose run --rm ubuntu-cuda-cpp
565565
# Parameters:
566566
# ARCH: amd64
567+
# UBUNTU: 22.04, 24.04
567568
# CUDA: <depends on your nvidia driver, should match system CUDA>
568569
image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-cuda-${CUDA}-cpp
569570
build:
@@ -946,13 +947,15 @@ services:
946947

947948
ubuntu-cuda-python:
948949
# Usage:
949-
# docker compose build cuda-cpp
950-
# docker compose build cuda-python
951-
# docker compose run --rm cuda-python
950+
# docker compose build ubuntu-cuda-cpp
951+
# docker compose build ubuntu-cuda-python
952+
# docker compose run --rm ubuntu-cuda-python
952953
# Parameters:
953954
# ARCH: amd64
954955
# CUDA: <depends on your nvidia driver, should match system CUDA>
955956
# UBUNTU: 22.04, 24.04
957+
# NUMBA: master, latest, <version>
958+
# NUMBA_CUDA: master, latest, <version>
956959
image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-cuda-${CUDA}-python-3
957960
build:
958961
context: .
@@ -962,6 +965,7 @@ services:
962965
args:
963966
base: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-cuda-${CUDA}-cpp
964967
numba: ${NUMBA}
968+
numba_cuda: ${NUMBA_CUDA}
965969
shm_size: *shm-size
966970
environment:
967971
<<: [*common, *ccache, *sccache]

0 commit comments

Comments
 (0)