Skill Tracer
Skills › Scientific Agent Skills › optimize-for-gpu › installation.md

installation.md

137 lines · skills/optimize-for-gpu/references/installation.md at 5f2bc03

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1# Installation
2
3Per-library install commands, CUDA version selection, and environment setup.
4
5Use `uv add` in standalone examples to match this repository's convention. If the user's project
6already uses another package manager, follow that project rather than rewriting its tooling.
7
8Maintained RAPIDS examples target **26.08**, the current published stable line at review on
92026-10-01; 26.10 is nightly. Use the [release-specific platform matrix](https://docs.nvidia.com/datascience/platform-support/#rapids-26-08)
10and [installation selector](https://docs.nvidia.com/datascience/install/): Python 3.11-3.14,
11Linux x86_64/aarch64 with glibc >=2.28, or supported Linux under WSL2. Native macOS is not
12supported. The 26.08 matrix lists CUDA 12.2-12.9 with driver 535+ and Volta+, or CUDA
1313.0-13.3 with driver 580+ and Turing+. Confirm the exact GPU and toolkit combination;
14a newer driver alone does not supply all compiler/runtime components.
1626.08 requires **NumPy >=2 and CuPy >=14**; cuDF now targets **pandas 3**.
17Do not combine these pins with cuxfilter 26.06 or cuSpatial 25.04: each legacy stack needs its
18own environment. Choose **one** CUDA wheel family throughout an environment, never both.
19Current maintained wheels, including cuGraph and nx-cugraph, are published on PyPI;
20the optional NVIDIA index remains in commands for upstream consistency. cuSpatial still
21needs that index. Commands are illustrative and were not installed on CUDA hardware in this review.
23WSL2 has additional limits: the installation guide documents single-GPU support and no GDS.
24Warp is a separate package with a CPU-only macOS wheel; that does not enable CUDA or Metal on macOS.
26```bash
27# CuPy (choose the right CUDA version; CuPy 14+ supports CUDA 12/13 only)
28uv add "cupy-cuda12x==14.2.*" # For CUDA 12.x
29uv add "cupy-cuda13x==14.2.*" # For CUDA 13.x
31# Numba-CUDA compatibility path (maintenance mode; installs numba automatically)
32uv add "numba-cuda[cu12]==0.30.*" # use [cu13] for CUDA 13
33# For new kernel projects, evaluate Numba-CUDA-MLIR and its migration guide first.
35# Warp (simulation, spatial computing, differentiable programming)
36uv add "warp-lang==1.17.*" # CUDA 12 runtime included; CUDA 13 builds are on GitHub Releases only
38# cuDF (RAPIDS)
39uv add --extra-index-url=https://pypi.nvidia.com "cudf-cu12==26.8.*"
40# For cudf.pandas accelerator mode, that's all you need
41# Load it with: python -m cudf.pandas your_script.py
43# cuML (RAPIDS machine learning)
44uv add --extra-index-url=https://pypi.nvidia.com "cuml-cu12==26.8.*"
45# For cuml.accel accelerator mode (zero-change sklearn acceleration):
46# Load it with: python -m cuml.accel your_script.py
48# cuGraph (RAPIDS graph analytics)
49uv add --extra-index-url=https://pypi.nvidia.com "cugraph-cu12==26.8.*" # Core cuGraph
50uv add --extra-index-url=https://pypi.nvidia.com "nx-cugraph-cu12==26.8.*" # NetworkX backend
51# For nx-cugraph zero-change NetworkX acceleration:
52# NX_CUGRAPH_AUTOCONFIG=True python your_script.py
54# KvikIO (high-performance GPU file IO)
55uv add --extra-index-url=https://pypi.nvidia.com "kvikio-cu12==26.8.*"
56# Optional: uv add "zarr==3.*" # For Zarr GPU backend support
58# cuxfilter (separate legacy environment) — SUNSET: 26.06 is the final release
59uv add --extra-index-url=https://pypi.nvidia.com "cuxfilter-cu12==26.6.*"
60# Depends on cuDF — installs it automatically
62# cuCIM (RAPIDS image processing — scikit-image on GPU)
63uv add --extra-index-url=https://pypi.nvidia.com "cucim-cu12==26.8.*"
65# cuVS (RAPIDS vector search)
66uv add --extra-index-url=https://pypi.nvidia.com "cuvs-cu12==26.8.*"
68# cuSpatial (geospatial) — ARCHIVED: frozen at 25.04, pins cudf-cu12==25.4.*
69# Install only in a dedicated environment; NVIDIA index required
70uv add --extra-index-url=https://pypi.nvidia.com "cuspatial-cu12==25.4.*"
72# RAFT (low-level GPU primitives)
73uv add --extra-index-url=https://pypi.nvidia.com "pylibraft-cu12==26.8.*" # Core primitives
74uv add --extra-index-url=https://pypi.nvidia.com "raft-dask-cu12==26.8.*" # Multi-GPU support (optional)
75```
77To check CUDA availability after installation:
79```python
80# CuPy
81import cupy as cp
82print(cp.cuda.runtime.getDeviceCount()) # Should be >= 1
84# Numba
85from numba import cuda
86print(cuda.is_available()) # Should be True
87print(cuda.detect()) # Shows GPU details
89# cuDF
90import cudf
91print(cudf.Series([1, 2, 3])) # Should print a GPU series
93# cuML
94import cuml
95print(cuml.__version__) # Should print version
97# cuGraph
98import cugraph
99print(cugraph.__version__) # Should print version
101# Warp
102import warp as wp
103wp.init() # Should print device info
105# KvikIO
106import kvikio
107import kvikio.cufile_driver
108print(kvikio.cufile_driver.get("is_gds_available")) # Capability, not proof every I/O used GDS
110# cuxfilter
111import cuxfilter
112print(cuxfilter.__version__) # Should print version
114# cuCIM
115from cucim.skimage.filters import gaussian
116import cupy as cp
117print(gaussian(cp.zeros((8, 8), dtype=cp.float32), sigma=1).shape)
119# cuVS
120from cuvs.neighbors import cagra
121import cupy as cp
122dataset = cp.random.rand(1000, 128, dtype=cp.float32)
123index = cagra.build(cagra.IndexParams(), dataset)
124print("cuVS working") # Should print confirmation
126# cuSpatial
127import cuspatial
128from shapely.geometry import Point
129gs = cuspatial.GeoSeries([Point(0, 0)])
130print("cuSpatial working") # Should print confirmation
132# RAFT (pylibraft)
133from pylibraft.common import DeviceResources
134handle = DeviceResources()
135handle.sync()
136print("pylibraft is working")
137```

Installation

Per-library install commands, CUDA version selection, and environment setup.

Use uv add in standalone examples to match this repository's convention. If the user's project already uses another package manager, follow that project rather than rewriting its tooling.

Maintained RAPIDS examples target 26.08, the current published stable line at review on 2026-10-01; 26.10 is nightly. Use the release-specific platform matrix and installation selector: Python 3.11-3.14, Linux x86_64/aarch64 with glibc >=2.28, or supported Linux under WSL2. Native macOS is not supported. The 26.08 matrix lists CUDA 12.2-12.9 with driver 535+ and Volta+, or CUDA 13.0-13.3 with driver 580+ and Turing+. Confirm the exact GPU and toolkit combination; a newer driver alone does not supply all compiler/runtime components.

26.08 requires NumPy >=2 and CuPy >=14; cuDF now targets pandas 3. Do not combine these pins with cuxfilter 26.06 or cuSpatial 25.04: each legacy stack needs its own environment. Choose one CUDA wheel family throughout an environment, never both. Current maintained wheels, including cuGraph and nx-cugraph, are published on PyPI; the optional NVIDIA index remains in commands for upstream consistency. cuSpatial still needs that index. Commands are illustrative and were not installed on CUDA hardware in this review.

WSL2 has additional limits: the installation guide documents single-GPU support and no GDS. Warp is a separate package with a CPU-only macOS wheel; that does not enable CUDA or Metal on macOS.

# CuPy (choose the right CUDA version; CuPy 14+ supports CUDA 12/13 only)
uv add "cupy-cuda12x==14.2.*"          # For CUDA 12.x
uv add "cupy-cuda13x==14.2.*"          # For CUDA 13.x

# Numba-CUDA compatibility path (maintenance mode; installs numba automatically)
uv add "numba-cuda[cu12]==0.30.*"      # use [cu13] for CUDA 13
# For new kernel projects, evaluate Numba-CUDA-MLIR and its migration guide first.

# Warp (simulation, spatial computing, differentiable programming)
uv add "warp-lang==1.17.*"              # CUDA 12 runtime included; CUDA 13 builds are on GitHub Releases only

# cuDF (RAPIDS)
uv add --extra-index-url=https://pypi.nvidia.com "cudf-cu12==26.8.*"
# For cudf.pandas accelerator mode, that's all you need
# Load it with: python -m cudf.pandas your_script.py

# cuML (RAPIDS machine learning)
uv add --extra-index-url=https://pypi.nvidia.com "cuml-cu12==26.8.*"
# For cuml.accel accelerator mode (zero-change sklearn acceleration):
# Load it with: python -m cuml.accel your_script.py

# cuGraph (RAPIDS graph analytics)
uv add --extra-index-url=https://pypi.nvidia.com "cugraph-cu12==26.8.*"    # Core cuGraph
uv add --extra-index-url=https://pypi.nvidia.com "nx-cugraph-cu12==26.8.*" # NetworkX backend
# For nx-cugraph zero-change NetworkX acceleration:
# NX_CUGRAPH_AUTOCONFIG=True python your_script.py

# KvikIO (high-performance GPU file IO)
uv add --extra-index-url=https://pypi.nvidia.com "kvikio-cu12==26.8.*"
# Optional: uv add "zarr==3.*"   # For Zarr GPU backend support

# cuxfilter (separate legacy environment) — SUNSET: 26.06 is the final release
uv add --extra-index-url=https://pypi.nvidia.com "cuxfilter-cu12==26.6.*"
# Depends on cuDF — installs it automatically

# cuCIM (RAPIDS image processing — scikit-image on GPU)
uv add --extra-index-url=https://pypi.nvidia.com "cucim-cu12==26.8.*"

# cuVS (RAPIDS vector search)
uv add --extra-index-url=https://pypi.nvidia.com "cuvs-cu12==26.8.*"

# cuSpatial (geospatial) — ARCHIVED: frozen at 25.04, pins cudf-cu12==25.4.*
# Install only in a dedicated environment; NVIDIA index required
uv add --extra-index-url=https://pypi.nvidia.com "cuspatial-cu12==25.4.*"

# RAFT (low-level GPU primitives)
uv add --extra-index-url=https://pypi.nvidia.com "pylibraft-cu12==26.8.*"   # Core primitives
uv add --extra-index-url=https://pypi.nvidia.com "raft-dask-cu12==26.8.*"   # Multi-GPU support (optional)

To check CUDA availability after installation:

# CuPy
import cupy as cp
print(cp.cuda.runtime.getDeviceCount())  # Should be >= 1

# Numba
from numba import cuda
print(cuda.is_available())               # Should be True
print(cuda.detect())                     # Shows GPU details

# cuDF
import cudf
print(cudf.Series([1, 2, 3]))           # Should print a GPU series

# cuML
import cuml
print(cuml.__version__)                  # Should print version

# cuGraph
import cugraph
print(cugraph.__version__)               # Should print version

# Warp
import warp as wp
wp.init()                                # Should print device info

# KvikIO
import kvikio
import kvikio.cufile_driver
print(kvikio.cufile_driver.get("is_gds_available"))  # Capability, not proof every I/O used GDS

# cuxfilter
import cuxfilter
print(cuxfilter.__version__)             # Should print version

# cuCIM
from cucim.skimage.filters import gaussian
import cupy as cp
print(gaussian(cp.zeros((8, 8), dtype=cp.float32), sigma=1).shape)

# cuVS
from cuvs.neighbors import cagra
import cupy as cp
dataset = cp.random.rand(1000, 128, dtype=cp.float32)
index = cagra.build(cagra.IndexParams(), dataset)
print("cuVS working")                    # Should print confirmation

# cuSpatial
import cuspatial
from shapely.geometry import Point
gs = cuspatial.GeoSeries([Point(0, 0)])
print("cuSpatial working")              # Should print confirmation

# RAFT (pylibraft)
from pylibraft.common import DeviceResources
handle = DeviceResources()
handle.sync()
print("pylibraft is working")
Raw lines 1 to 137
Runs code python your_script.py :52