From e07d66c19e085ae73ec32c0a0fd924799a18d6f2 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Wed, 4 Sep 2024 13:04:30 -0500 Subject: [PATCH] fix wheel tests on Rocky Linux (#1452) RAPIDS libraries recently started running nightly wheel tests on Rocky Linux 8: https://github.com/rapidsai/shared-workflows/pull/236/files#r1725947245 That distribution's system package manager is `yum`, not `apt`, and as a result `cuspatial`'s nightly runs are failing like this: ```text ci/test_wheel_cuspatial.sh: line 10: apt: command not found Error: Process completed with exit code 127. ``` ([build link](https://github.com/rapidsai/cuspatial/actions/runs/10678284262/job/29595047179)) This fixes that. ## Notes for Reviewers ### How I tested this ```shell docker run \ --rm \ --gpus 1 \ -v $(pwd):/opt/work \ -w /opt/work \ -it rapidsai/citestwheel:cuda12.5.1-rockylinux8-py3.11 \ bash yum update -y yum config-manager --set-enabled powertools yum update -y yum install -y gdal-devel python -m pip install \ --no-binary fiona \ 'cuproj-cu12[test]==24.10.*,>=0.0.0a0' \ 'cuspatial-cu12[test]==24.10.*,>=0.0.0a0' \ 'fiona>=1.8.19,<1.9' pushd python/cuproj/cuproj python -m pytest \ --cache-clear \ --numprocesses=8 \ --dist=worksteal \ tests popd pushd python/cuspatial/cuspatial python -m pytest \ --cache-clear \ --numprocesses=8 \ --dist=worksteal \ tests popd ``` # Authors: - James Lamb (https://github.com/jameslamb) Approvers: - Bradley Dice (https://github.com/bdice) URL: https://github.com/rapidsai/cuspatial/pull/1452 --- README.md | 7 +++++++ ci/test_wheel_cuproj.sh | 12 ++++++++++-- ci/test_wheel_cuspatial.sh | 12 ++++++++++-- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 96ffa4502..a2a2be972 100644 --- a/README.md +++ b/README.md @@ -164,6 +164,13 @@ There are two ways to fix this: sudo -y add-apt-repository ppa:ubuntugis/ppa sudo apt install libgdal-dev ``` + * Rocky Linux users can install a newer GDAL as follows + ```shell + yum update -y + yum config-manager --set-enabled powertools + yum update -y + yum install -y gdal-devel + ``` 2. Pin fiona's version to a range that's compatible with your version of `libgdal-dev` * For Ubuntu20.04 ([GDAL v3.0.4](https://packages.ubuntu.com/focal/libgdal-dev)): ```shell diff --git a/ci/test_wheel_cuproj.sh b/ci/test_wheel_cuproj.sh index 4144e8dab..594702479 100755 --- a/ci/test_wheel_cuproj.sh +++ b/ci/test_wheel_cuproj.sh @@ -7,8 +7,16 @@ mkdir -p ./dist RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" # install build dependencies for fiona -apt update -DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends libgdal-dev +if type -f yum > /dev/null 2>&1; then + yum update -y + # some of gdal-devel's dependencies, like 'libdap', come from the powertools repo + yum config-manager --set-enabled powertools + yum update -y + yum install -y gdal-devel +else + apt update + DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends libgdal-dev +fi # Download the cuproj and cuspatial built in the previous step RAPIDS_PY_WHEEL_NAME="cuproj_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 python ./dist diff --git a/ci/test_wheel_cuspatial.sh b/ci/test_wheel_cuspatial.sh index 8faa4e8d3..c4708e80e 100755 --- a/ci/test_wheel_cuspatial.sh +++ b/ci/test_wheel_cuspatial.sh @@ -7,8 +7,16 @@ mkdir -p ./dist RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" # install build dependencies for fiona -apt update -DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends libgdal-dev +if type -f yum > /dev/null 2>&1; then + yum update -y + # some of gdal-devel's dependencies, like 'libdap', come from the powertools repo + yum config-manager --set-enabled powertools + yum update -y + yum install -y gdal-devel +else + apt update + DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends libgdal-dev +fi # Download the cuspatial built in the previous step RAPIDS_PY_WHEEL_NAME="cuspatial_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 python ./dist