여기에서 사용된 Vertex AI SDK for Python의 Ray는 Ray 클라이언트, Ray BigQuery 커넥터, Vertex AI 기반 Ray 클러스터 관리, Vertex AI의 예측 기능이 포함된 Vertex AI SDK for Python 버전입니다.
Google Cloud 콘솔에서 Vertex AI의 Ray를 사용하는 경우 Colab Enterprise 노트북은 Ray 클러스터를 만든 후 Vertex AI SDK for Python 설치 프로세스를 안내합니다.
Vertex AI Workbench 또는 다른 대화형 Python 환경에서 Vertex AI의 Ray를 사용하는 경우 Vertex AI SDK for Python을 설치합니다.
# The latest image in the Ray cluster includes Ray 2.42
# The latest supported Python version is Python 3.10.
$ pip install google-cloud-aiplatform[ray]
(선택사항) Vertex AI에서 데이터 무단 반출 위험을 완화하려면 클러스터를 만들 때 VPC 서비스 제어를 사용 설정하고 VPC 네트워크를 지정하면 됩니다. 자세한 내용은 Vertex AI를 사용한 VPC 서비스 제어를 참조하세요.
VPC 서비스 제어를 사용 설정하면 경계 외부의 리소스(예: Cloud Storage 버킷의 파일)에 연결할 수 없습니다.
(선택사항) 커스텀 컨테이너 이미지를 사용하려면 Artifact Registry에 호스팅합니다. 커스텀 이미지를 사용하면 사전 빌드된 컨테이너 이미지에 포함되지 않은 Python 종속 항목을 추가할 수 있습니다. 커스텀 이미지를 빌드하려면 Docker 문서에서 소프트웨어 패킹을 참조하세요.
(선택사항) Vertex AI에서 Ray 클러스터를 만들 때 VPC 네트워크를 지정하는 경우 프로젝트에서 자동 모드 VPC 네트워크를 사용하는 것이 좋습니다. 커스텀 모드 VPC 네트워크와 동일한 프로젝트의 여러 VPC 네트워크는 지원되지 않으며 클러스터 생성에 실패할 수 있습니다.
클러스터 보호하기
Ray 권장사항과 가이드라인을 준수하세요. 여기에는 Ray 워크로드 보안을 위해 신뢰할 수 있는 네트워크에서 신뢰할 수 있는 코드를 실행하는 것도 포함됩니다.
고객 클라우드 인스턴스에 ray.io를 배포하는 것은 공유 책임 모델에 포함됩니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[],[],null,["# Set up for Ray on Vertex AI\n\n| To see an example of getting started with Ray on Vertex AI cluster management,\n| run the \"Ray on Vertex AI cluster management\" notebook in one of the following\n| environments:\n|\n| [Open in Colab](https://colab.research.google.com/github/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/official/ray_on_vertex_ai/ray_cluster_management.ipynb)\n|\n|\n| \\|\n|\n| [Open in Colab Enterprise](https://console.cloud.google.com/vertex-ai/colab/import/https%3A%2F%2Fraw.githubusercontent.com%2FGoogleCloudPlatform%2Fvertex-ai-samples%2Fmain%2Fnotebooks%2Fofficial%2Fray_on_vertex_ai%2Fray_cluster_management.ipynb)\n|\n|\n| \\|\n|\n| [Open\n| in Vertex AI Workbench](https://console.cloud.google.com/vertex-ai/workbench/deploy-notebook?download_url=https%3A%2F%2Fraw.githubusercontent.com%2FGoogleCloudPlatform%2Fvertex-ai-samples%2Fmain%2Fnotebooks%2Fofficial%2Fray_on_vertex_ai%2Fray_cluster_management.ipynb)\n|\n|\n| \\|\n|\n| [View on GitHub](https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/official/ray_on_vertex_ai/ray_cluster_management.ipynb)\n\nBefore you begin with Ray on Vertex AI, follow these steps to set up your\nGoogle project and :\n\n1. Set up billing for your project, [install the\n gcloud CLI](/sdk/docs/install), and enable the Vertex AI API. To do this,\n follow the steps at [Set up a project and a development\n environment](/vertex-ai/docs/start/cloud-environment).\n\n [Enable the Vertex AI API](https://console.cloud.google.com/apis/enableflow?apiid=aiplatform.googleapis.com)\n2. Prerequisite: You must know how to develop programs using [open source\n Ray](https://docs.ray.io/en/latest/ray-overview/index.html).\n\n3. The Ray on Vertex AI SDK for Python used here is a version of the Vertex AI SDK for Python\n that includes the functionality of the [Ray\n Client](https://docs.ray.io/en/latest/cluster/running-applications/job-submission/ray-client.html),\n Ray BigQuery connector, Ray\n cluster management on Vertex AI, and predictions on Vertex AI.\n\n - If you use Ray on Vertex AI in the Google Cloud console, a\n Colab Enterprise\n notebook guides you through the Vertex AI SDK for Python installation\n process after you [create a Ray cluster](/vertex-ai/docs/open-source/ray-on-vertex-ai/create-cluster).\n\n - If you use Ray on Vertex AI in the Vertex AI Workbench or other interactive Python environment, install the Vertex AI SDK for Python:\n\n ```\n # The latest image in the Ray cluster includes Ray 2.47\n # The latest supported Python version is Python 3.11.\n $ pip install google-cloud-aiplatform[ray]\n ```\n\n After you install the SDK, restart the kernel before you import packages.\n | **Note:** If you use a Vertex AI Workbench notebook as the client environment and use the [Deep Learning VM](/deep-learning-vm/docs/introduction) as the machine image, Ray and the Vertex AI SDK for Python are pre-installed in the Python, TensorFlow Enterprise\n4. Optional: If you plan to read from BigQuery, create a\n new BigQuery dataset or use an existing\n dataset. To do this, see [create a new BigQuery dataset](/bigquery/docs/datasets).\n\n | **Note:** If you run code on your Ray cluster on Vertex AI that interacts with Google services like BigQuery, the [Vertex AI Custom Code Service\n | Agent](/vertex-ai/docs/general/access-control#service-agents) authenticates.\n5. (Optional) To mitigate the risk of data exfiltration from\n Vertex AI, enable VPC Service Controls and specify\n a VPC network when you create a cluster. For more\n information, see [VPC Service Controls with\n Vertex AI](/vertex-ai/docs/general/vpc-service-controls).\n\n If you enable VPC Service Controls, you can't reach resources\n outside the perimeter, such as files in a Cloud Storage bucket.\n | **Note:** The best setup for Ray on Vertex AI 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.\n6. (Optional) To use a custom container image, host it on\n [Artifact Registry](/artifact-registry/docs/overview). 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](https://docs.docker.com/build/building/packaging/).\n\n7. (Optional) If you specify a VPC network when creating a Ray cluster on\n Vertex AI, it's highly recommended that you use an auto mode VPC network\n in your project. Custom mode VPC networks and multiple VPC networks in the\n same project aren't supported and may cause cluster creation to fail.\n\nSecure your clusters\n--------------------\n\nFollow [Ray best practices and guidelines](https://docs.ray.io/en/latest/ray-security/index.html#best-practices), including\nrunning trusted code on trusted networks, to secure your Ray workloads.\nDeployment of ray.io in your cloud instances falls under the model of\n[shared responsibility](/vertex-ai/docs/shared-responsibility).\n\nFor more information about Google Cloud best practices, see the\n[GCP-2024-020 security bulletin](/support/bulletins#gcp-2024-020).\n\nSupported locations\n-------------------\n\nThe [Feature availability](/vertex-ai/docs/general/locations#available-regions) table lists the available locations for Ray on Vertex AI for Custom\nmodel training.\n\nWhat's next\n-----------\n\n- [Create a Ray cluster on Vertex AI](/vertex-ai/docs/open-source/ray-on-vertex-ai/create-cluster)"]]