Bringing gVisor sandboxes to d... Note

Bringing gVisor sandboxes to distributed Ray clusters

Reinforcement learning workflows are increasingly utilizing Ray as a unified compute runtime. However, orchestrating secure, isolated sandboxes at scale for dynamic rollouts and complex interactions has become a bottleneck. To address this, an experimental library for Ray has been introduced, integrating native, high-performance sandboxing directly into distributed Ray clusters. This new library represents sandboxes as Ray Actors, allowing them to be managed like other Ray resources. The Ray scheduler handles placement and resource allocation for these sandbox Actors. Each sandbox Actor then utilizes gVisor for isolated execution on its designated node. Framework authors and researchers can now manage these sandboxed environments using existing Ray APIs and patterns. The sandbox API provides functionalities for creating, configuring, and executing commands within these environments. It also supports file operations and state inspection. For more advanced use cases, SandboxRuntime offers direct access to local gVisor sandboxes, allowing customization before execution. The choice of gVisor provides a strong isolation boundary between workloads and the host kernel. These sandboxes are lightweight, offer sub-second startup times, and low memory overhead, making them suitable for dynamic agentic workloads. Future versions of Ray plan to extend support to other sandboxing runtimes. Users can try Ray sandboxing on Google Kubernetes Engine and provide feedback on GitHub.
CdXz5zHNQW_2RT5oca7fM.png