Skip to content

Commit

Permalink
Add support for Python 3.12, drop pyppeteer dependency (#625)
Browse files Browse the repository at this point in the history
Contributes to rapidsai/build-planning#40

This PR adds support for Python 3.12.

## Notes for Reviewers

This is part of ongoing work to add Python 3.12 support across RAPIDS.
It temporarily introduces a build/test matrix including Python 3.12, from rapidsai/shared-workflows#213.

A follow-up PR will revert back to pointing at the `branch-24.10` branch of `shared-workflows` once all
RAPIDS repos have added Python 3.12 support.

Additional changes needed to add this support:

* dropping dependency on `pyppeteer` (https://github.com/rapidsai/cuxfilter/pull/625/files#r1750741079)

### This will fail until all dependencies have been updates to Python 3.12

CI here is expected to fail until all of this project's upstream dependencies support Python 3.12.

This can be merged whenever all CI jobs are passing.

Authors:
  - James Lamb (https://github.com/jameslamb)
  - Bradley Dice (https://github.com/bdice)

Approvers:
  - Bradley Dice (https://github.com/bdice)

URL: #625
  • Loading branch information
jameslamb authored Sep 10, 2024
1 parent ca63e9d commit 53537fe
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 41 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ concurrency:
jobs:
python-build:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@python-3.12
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -37,7 +37,7 @@ jobs:
upload-conda:
needs: [python-build]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@python-3.12
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -47,7 +47,7 @@ jobs:
if: github.ref_type == 'branch'
needs: python-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@python-3.12
with:
arch: "amd64"
branch: ${{ inputs.branch }}
Expand All @@ -59,7 +59,7 @@ jobs:
sha: ${{ inputs.sha }}
wheel-build:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@python-3.12
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -71,7 +71,7 @@ jobs:
wheel-publish:
needs: wheel-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@python-3.12
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,27 @@ jobs:
- wheel-build
- wheel-tests
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@python-3.12
checks:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@python-3.12
conda-python-build:
needs: checks
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@python-3.12
with:
build_type: pull-request
conda-python-tests:
needs: conda-python-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@python-3.12
with:
build_type: pull-request
run_codecov: false
conda-notebook-tests:
needs: conda-python-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@python-3.12
with:
build_type: pull-request
node_type: "gpu-v100-latest-1"
Expand All @@ -50,7 +50,7 @@ jobs:
docs-build:
needs: conda-python-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@python-3.12
with:
build_type: pull-request
node_type: "gpu-v100-latest-1"
Expand All @@ -60,7 +60,7 @@ jobs:
wheel-build:
needs: checks
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@python-3.12
with:
build_type: pull-request
script: ci/build_wheel.sh
Expand All @@ -69,7 +69,7 @@ jobs:
wheel-tests:
needs: wheel-build
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@python-3.12
with:
build_type: pull-request
script: ci/test_wheel.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-external.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:
jobs:
test-external:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@python-3.12
with:
build_type: branch
node_type: "gpu-v100-latest-1"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ on:
jobs:
conda-python-tests:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@python-3.12
with:
build_type: nightly
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
wheel-tests:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@python-3.12
with:
build_type: nightly
branch: ${{ inputs.branch }}
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ Troubleshooting help can be found [on our troubleshooting page](https://docs.rap
- bokeh
- pyproj
- geopandas
- pyppeteer
- jupyter-server-proxy

## Quick Start
Expand All @@ -146,8 +145,7 @@ Please see the [Demo Docker Repository](https://hub.docker.com/r/rapidsai/rapids
### CUDA/GPU requirements

- CUDA 11.2+
- NVIDIA driver 450.80.02+
- Pascal architecture or better (Compute Capability >=6.0)
- Volta architecture or newer (Compute Capability >=7.0)

### Conda

Expand All @@ -156,28 +154,30 @@ cuxfilter can be installed with conda ([miniconda](https://conda.io/miniconda.ht
For nightly version `cuxfilter version == 24.10` :

```bash
# for CUDA 12.0
# for CUDA 12.5
conda install -c rapidsai-nightly -c conda-forge -c nvidia \
cuxfilter=24.10 python=3.11 cuda-version=12.0
cuxfilter=24.10 python=3.12 cuda-version=12.5

# for CUDA 11.8
conda install -c rapidsai-nightly -c conda-forge -c nvidia \
cuxfilter=24.10 python=3.11 cuda-version=11.8
cuxfilter=24.10 python=3.12 cuda-version=11.8
```

For the stable version of `cuxfilter` :

```bash
# for CUDA 12.0
# for CUDA 12.5
conda install -c rapidsai -c conda-forge -c nvidia \
cuxfilter python=3.11 cuda-version=12.0
cuxfilter python=3.12 cuda-version=12.5

# for CUDA 11.8
conda install -c rapidsai -c conda-forge -c nvidia \
cuxfilter python=3.11 cuda-version=11.8
cuxfilter python=3.12 cuda-version=11.8
```

Note: cuxfilter is supported only on Linux, and with Python versions 3.10 and 3.11.
Note: cuxfilter is supported only on Linux, and with Python versions 3.10, 3.11, and 3.12.

> Above are sample install snippets for cuxfilter, see the [Get RAPIDS version picker](https://rapids.ai/start.html) for installing the latest `cuxfilter` version.
### PyPI

Expand Down
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ dependencies:
- pytest
- pytest-cov
- pytest-xdist
- python>=3.10,<3.12
- python>=3.10,<3.13
- rapids-build-backend>=0.3.0,<0.4.0.dev0
- recommonmark
- setuptools
Expand Down
2 changes: 1 addition & 1 deletion conda/environments/all_cuda-125_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ dependencies:
- pytest
- pytest-cov
- pytest-xdist
- python>=3.10,<3.12
- python>=3.10,<3.13
- rapids-build-backend>=0.3.0,<0.4.0.dev0
- recommonmark
- setuptools
Expand Down
1 change: 0 additions & 1 deletion conda/recipes/cuxfilter/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ requirements:
- numpy >=1.23,<2.0a0
- packaging
- panel >=1.0
- pyppeteer >=0.2.6
- python
- {{ pin_compatible('cuda-version', max_pin='x', min_pin='x') }}

Expand Down
8 changes: 6 additions & 2 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,12 @@ dependencies:
packages:
- python=3.11
- matrix:
py: "3.12"
packages:
- python>=3.10,<3.12
- python=3.12
- matrix:
packages:
- python>=3.10,<3.13
rapids_build_setuptools:
common:
- output_types: [conda, requirements, pyproject]
Expand Down Expand Up @@ -267,6 +271,6 @@ dependencies:
- *cuspatial_unsuffixed
- *dask_cudf_unsuffixed
- cuxfilter==24.10.*,>=0.0.0a0
- python>=3.10,<3.12
- python>=3.10,<3.13
- pytest-benchmark
- pytest-xdist
13 changes: 3 additions & 10 deletions notebooks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,14 @@ These are example notebooks to showcase cuxfilter with [cuDF](https://github.com

Once you have registered with your email address, simply sign in to your account, start a CPU or GPU runtime, and open your project - all in your browser.

To setup a rapids environment in studio lab(you only need to do this the first time, since studio lab has 15GB of persistent storage across sessions), open a new terminal:
To setup a RAPIDS environment in studio lab (you only need to do this the first time, since studio lab has 15GB of persistent storage across sessions),
open a new terminal and run the following

```bash
conda install ipykernel

# for stable rapids version
conda install -c rapidsai -c numba -c conda-forge -c nvidia \
cuxfilter=23.02 python=3.11 cudatoolkit=11.8

# for nightly rapids version
conda install -c rapidsai-nightly -c numba -c conda-forge -c nvidia \
cuxfilter python=3.11 cudatoolkit=11.8
```

> Above are sample install snippets for cuxfilter, see the [Get RAPIDS version picker](https://rapids.ai/start.html) for installing the latest `cuxfilter` version.
Then install `cuxfilter` and its dependencies by following the instructions in ["Installation"](../README.md#installation) in the project's main README.

Once installed, you should see a card in the launcher for that environment and kernel after about a minute.

Expand Down
1 change: 1 addition & 0 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]

[project.optional-dependencies]
Expand Down

0 comments on commit 53537fe

Please sign in to comment.