[ Web Proxy ]
URL:
Viewing: https://cloud.google.com/gemini-enterprise-agent-platform/machine-learning/open-source/ray/set-up [Back]  [Original]

Set up for Ray on Agent Platform  |  Gemini Enterprise Agent Platform  |  Google Cloud Documentation Skip to main content
Google Cloud Documentation [Google Cloud Documentation]
Send feedback

Set up for Ray on Agent Platform Stay organized with collections Save and categorize content based on your preferences.

To see an example of getting started with Ray on cluster management, run the "Ray on cluster management" notebook in one of the following environments:

[]Open in Colab | []Open in Colab Enterprise | []Open in Agent Platform Workbench | []View on GitHub

Before you begin with Ray on Agent Platform, follow these steps to set up your Google project and Agent Platform SDK for Python:

  1. Set up billing for your project, install the gcloud CLI, and enable the Agent Platform API. To do this, follow the steps at Set up a project and a development environment.

    Enable the Agent Platform API

  2. Prerequisite: You must know how to develop programs using open source Ray.

  3. The Ray on Agent Platform SDK for Python used here is a version of the Agent Platform SDK for Python that includes the functionality of the Ray Client, Ray BigQuery connector, Ray cluster management on Gemini Enterprise Agent Platform, and predictions on Gemini Enterprise Agent Platform.

    • If you use Ray on Agent Platform in the Google Cloud console, a Colab Enterprise notebook guides you through the Agent Platform SDK for Python installation process after you create a Ray cluster.

    • If you use Ray on Agent Platform in the Vertex AI Workbench or other interactive Python environment, install the Agent Platform SDK for Python:

      # The latest image in the Ray cluster includes Ray 2.47
      # The latest supported Python version is Python 3.11.
      $ pip install google-cloud-aiplatform[ray]

      After you install the SDK, restart the kernel before you import packages.

      Note: If you use a Vertex AI Workbench notebook as the client environment and use the Deep Learning VM as the machine image, Ray and the Agent Platform SDK for Python are pre-installed in the Python, TensorFlow Enterprise
  4. Optional: If you plan to read from BigQuery, create a new BigQuery dataset or use an existing dataset. To do this, see create a new BigQuery dataset.

    Note: If you run code on your Ray cluster on Gemini Enterprise Agent Platform that interacts with Google services like BigQuery, the Gemini Enterprise Agent Platform Custom Code Service Agent authenticates.
  5. (Optional) To mitigate the risk of data exfiltration from Agent Platform, enable VPC Service Controls and specify a VPC network when you create a cluster. For more information, see VPC Service Controls with Agent Platform.

    If you enable VPC Service Controls, you can't reach resources outside the perimeter, such as files in a Cloud Storage bucket.

    Note: The best setup for Ray on Agent Platform is one auto mode VPC network per project. If you use a custom mode VPC network or use multiple VPC networks to create clusters in the same project, you might encounter issues.
  6. (Optional) To use a custom container image, host it on Artifact Registry. A custom image lets you add Python dependencies that aren't included with the prebuilt container images. To build custom images, see Packing your software in the Docker documentation.

  7. (Optional) If you specify a VPC network when creating a Ray cluster on Gemini Enterprise Agent Platform, it's highly recommended that you use an auto mode VPC network in your project. Custom mode VPC networks and multiple VPC networks in the same project aren't supported and may cause cluster creation to fail.

Secure your clusters

Follow Ray best practices and guidelines, including running trusted code on trusted networks, to secure your Ray workloads. Deployment of ray.io in your cloud instances falls under the model of shared responsibility.

For more information about Google Cloud best practices, see the GCP-2024-020 security bulletin.

Supported locations

The Feature availability table lists the available locations for Ray on Agent Platform for Custom model training.

What's next

Send feedback

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-08-19 UTC.

Need to tell us more? [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-19 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page