gcp Google Cloud Blog ·

Bringing gVisor Sandboxes to Distributed Ray Clusters on Google Cloud

blogaigcppreviewengineergcp-gke
feature

Google Cloud, in partnership with Anyscale, has introduced an experimental library that integrates native, high-performance gVisor sandboxing directly into distributed Ray clusters. This capability addresses the critical need for secure and isolated environments at scale for dynamic rollouts, code generation, and multi-turn tool interactions in agentic AI and reinforcement learning workloads. Available from Ray 2.58, the sandboxes are exposed as Ray Actors, allowing framework authors and researchers to manage isolated environments using familiar Ray APIs. The use of gVisor provides strong isolation with low overhead and sub-second startup times, making it suitable for fine-grained distributed resources.

  • Introducing Ray Sandboxing with gVisor for Agentic AI Workloads
  • Sandboxes Integrated as Ray Primitives
  • Comprehensive Sandbox API Capabilities
  • Utilizing gVisor for Enhanced Isolation and Performance
  • Try Ray Sandboxing on GKE
Features (3)
  • Introducing Ray Sandboxing with gVisor for Agentic AI Workloads

    An experimental library is introduced to bring native, high-performance sandboxing to distributed Ray clusters, leveraging agentic AI technologies from Google and gVisor. This directly addresses the need for secure, isolated execution of dynamic rollouts, code generation, and multi-turn tool interactions in evolving agentic and reasoning models.

  • Sandboxes Integrated as Ray Primitives

    Ray Sandboxing is designed to fit naturally into the existing Ray programming model, representing each high-level sandbox through a Ray Actor. Starting in Ray 2.58, this allows framework authors and researchers to manage sandboxed environments using the same Ray APIs and patterns used for other workload components.

  • Comprehensive Sandbox API Capabilities

    The sandbox API covers essential lifecycle management for agentic workloads, enabling creation of environments from OCI images, setting CPU/memory limits, configuring environment variables, executing commands, and performing file operations. A lower-level SandboxRuntime API is also available for direct gVisor interaction and OCI specification modification.

Notes (2)
  • Utilizing gVisor for Enhanced Isolation and Performance

    Ray Sandboxing uses gVisor, Google's open-source application kernel, as its initial runtime to provide an additional isolation boundary between untrusted workloads and the host kernel. gVisor offers stronger isolation than ordinary containers, supports standard OCI-compatible images, and boasts sub-second startup times with low memory overhead for dynamic, fine-grained sandboxes.

  • Try Ray Sandboxing on GKE

    Developers can explore the new sandboxing capabilities by checking out the Ray documentation and following the Ray sandboxing User Guide to deploy and test these features on Google Kubernetes Engine (GKE).

Read the original announcement →

https://cloud.google.com/blog/products/containers-kubernetes/gvisor-sandboxes-for-ray-clusters-on-gke/

Related releases