Skip to main content
Ctrl+K
RAPIDS Deployment Documentation - Home RAPIDS Deployment Documentation - Home

RAPIDS Deployment Documentation

nightly stable
  • Docs Home
  • GitHub
RAPIDS Deployment Documentation - Home RAPIDS Deployment Documentation - Home

RAPIDS Deployment Documentation

nightly stable
  • Docs Home
  • GitHub

Table of Contents

  • Local
    • Custom RAPIDS Docker Guide
  • Cloud
    • NVIDIA Cloud Platforms
      • NVIDIA Brev
    • Amazon Web Services
      • Elastic Compute Cloud (EC2)
      • EC2 Cluster (via Dask)
      • AWS Elastic Kubernetes Service (EKS)
      • Elastic Container Service (ECS)
      • SageMaker
    • Microsoft Azure
      • Azure Virtual Machine
      • Azure Kubernetes Service
      • Azure VM Cluster (via Dask)
      • Azure Machine Learning
    • Google Cloud Platform
      • Compute Engine Instance
      • Vertex AI
      • Google Kubernetes Engine
      • Dataproc
    • IBM Cloud
      • Virtual Server for VPC
  • HPC
  • Platforms
    • NVIDIA AI Workbench
    • Kubernetes
    • Kubeflow
    • KServe
    • Coiled
    • Databricks
    • RAPIDS on Google Colab
    • Snowflake
    • Modal
  • Tools
    • dask-cuda
    • Dask Operator
    • Dask Helm Chart
  • Workflow Examples
    • Scaling up Hyperparameter Optimization with Kubernetes and XGBoost GPU Algorithm
    • Scaling up Hyperparameter Optimization with Multi-GPU Workload on Kubernetes
    • Getting Started with Optuna and RAPIDS for HPO
    • Running RAPIDS Hyperparameter Experiments at Scale on Amazon SageMaker
    • Deep Dive into Running Hyper Parameter Optimization on AWS SageMaker
    • Multi-node Multi-GPU Example on AWS using dask-cloudprovider
    • Autoscaling Multi-Tenant Kubernetes Deep-Dive
    • HPO with dask-ml and cuml
    • Train and Hyperparameter-Tune with RAPIDS on AzureML
    • Perform Time Series Forecasting on Google Kubernetes Engine with NVIDIA GPUs
    • HPO Benchmarking with RAPIDS and Dask
    • Training XGBoost with Dask RAPIDS in Databricks
    • Multi-Node Multi-GPU XGBoost Example on Azure using dask-cloudprovider
    • Measuring Performance with the One Billion Row Challenge
    • Getting Started with cudf.pandas and Snowflake
    • Getting Started with cuML’s accelerator mode (cuml.accel) in Snowflake Notebooks
    • Accelerating data analysis using cudf.pandas
    • Deploying End-to-End Kafka Streaming SI Detection Pipeline with cuDF, Morpheus, and Triton on EKS
    • Orchestrating a Fraud Detection Model Lifecycle with cuDF, Prefect, MLflow, and Triton
    • GPU-Accelerated Land Use Land Cover Classification
    • HPO for Random Forest with Ray Tune and cuML
  • Guides
    • Multi-Instance GPU (MIG)
    • Building RAPIDS containers from a custom base image
    • How to Setup InfiniBand on Azure
    • Does the Dask scheduler need a GPU?
    • GPU optimization for the Dask scheduler on Kubernetes
    • Colocate Dask workers on Kubernetes while using nodes with multiple GPUs
    • Caching Docker Images For Autoscaling Workloads
  • NVIDIA NIM Microservices
  • Developer
    • Continuous Integration
      • GitHub Actions
  • Platforms
  • Modal

Modal#

You can run RAPIDS on Modal, a serverless cloud platform for compute-intensive applications. Modal provides a simple way to deploy Python code, including GPU-accelerated workloads, without managing infrastructure. Remote containers are launched on-demand and shut down automatically when not in use.

cudf.pandas Run via Modal Apps#

Modal Apps are Python applications that run on Modal’s serverless infrastructure. An app is defined using the modal.App object and consists of one or more functions decorated with @app.function(). Functions can be invoked locally (which triggers remote execution).

Setup#

To get started with Modal, first sign up for an account at modal.com, and follow the getting started setup.

Modal has a starter tier, that includes enough free credits to run this example, and explore GPU usage for several hours. For more information, check out the Modal pricing page.

Warning

Python Installation Requirements

Modal’s default Python installation uses compilation flags that are not compatible with numba, which is required by RAPIDS. To work around this, you must install Python from Astral’s standalone Python builds, which include the correct compilation flags. As we did in the example above, where we are downloading and installing a standalone Python build in the Docker setup commands.

RAPIDS Memory Manager (RMM) Mode Limitations

Modal containers use gvisor for sandboxing, which does not support cudaMallocManaged. This means you cannot use the default managed_pool or managed RMM modes with cudf.pandas.

Instead, you need to set the environment variable CUDF_PANDAS_RMM_MODE to async as shown in the example code above.

For more details on RMM modes, see the cudf.pandas documentation.

Example#

The example below demonstrates how to use RAPIDS cuDF’s pandas accelerator mode on Modal. This example processes NYC parking violations data and shows how cudf.pandas can accelerate pandas operations with zero code changes.

from pathlib import Path

import modal

app = modal.App("zcc-cudf-demo")

install_uv_commands = [
    "RUN apt-get update && apt-get install -y python3 python3-pip python3-venv curl",
    "RUN ln -sf /usr/bin/python3 /usr/bin/python",
    "RUN curl -LsSf https://astral.sh/uv/install.sh | env INSTALLER_DIR=/usr/local/bin sh",
]

ctk_image = modal.Image.from_registry(
    "nvidia/cuda:13.1.1-runtime-ubuntu24.04",
    setup_dockerfile_commands=install_uv_commands,
).entrypoint([])  # removes chatty prints on entry


image = ctk_image.uv_pip_install(
    "cudf-cu13==26.08.*,>=0.0.0a0",
    extra_index_url="https://pypi.anaconda.org/rapidsai-wheels-nightly/simple",
).env({"CUDF_PANDAS_RMM_MODE": "async"})


data_cache = {
    "/data": modal.Volume.from_name(
        "nyc-parking-violations-2022", create_if_missing=True
    )
}


@app.function(image=image, gpu="A10", volumes=data_cache)
def run():
    import cudf.pandas

    cudf.pandas.install()

    import pandas as pd
    import urllib.request
    import os
    import time

    # download the file to a distributed Volume
    file_path = "/data/nyc_parking_violations_2022.parquet"
    if not os.path.exists(file_path):
        print("Downloading NYC parking violations dataset...")
        url = "https://data.rapids.ai/datasets/nyc_parking/nyc_parking_violations_2022.parquet"
        urllib.request.urlretrieve(url, file_path)
        print("Done!")


    start_time = time.time()

    df = pd.read_parquet(
        file_path,
        columns=[
            "Registration State",
            "Violation Description",
            "Vehicle Body Type",
            "Issue Date",
            "Summons Number",
        ],
    )

    result = (
        df[["Registration State", "Violation Description"]]
        .value_counts()
        .groupby("Registration State")
        .head(1)
        .sort_index()
        .reset_index()
    )
    end_time = time.time()

        print(f"Time taken: {end_time - start_time:.2f} seconds")
        print(f"Result shape: {result.shape}")
        print(result.head())

        # Verify GPU acceleration is working you should see <class 'cudf.pandas.fast_slow_proxy._FastSlowProxyMeta'>
        print(f"DataFrame type: {type(df).__name__}")

To run this app locally (which executes remotely on Modal):

$ modal run modal_app.py
...
df:    Registration State           Violation Description  count
0                  99                            <NA>  17550
1                  AB                  14-No Standing     22
2                  AK  PHTO SCHOOL ZN SPEED VIOLATION    125
3                  AL  PHTO SCHOOL ZN SPEED VIOLATION   3668
4                  AR  PHTO SCHOOL ZN SPEED VIOLATION    537
..                ...                             ...    ...
62                 VT  PHTO SCHOOL ZN SPEED VIOLATION   3024
63                 WA    21-No Parking (street clean)   3732
64                 WI                  14-No Standing   1639
65                 WV  PHTO SCHOOL ZN SPEED VIOLATION   1185
66                 WY    21-No Parking (street clean)    138

[67 rows x 3 columns]
<class 'cudf.pandas.fast_slow_proxy._FastSlowProxyMeta'>

previous

Snowflake

next

Tools

On this page
  • cudf.pandas Run via Modal Apps
    • Setup
    • Example

Spotted a mistake?
Let us know!

NVIDIA NVIDIA
Privacy Policy | Your Privacy Choices | Terms of Service | Accessibility | Corporate Policies | Product Security | Contact

Copyright © 2026, NVIDIA.