Setting up Studio for Ray
Amazon SageMaker Studio is a web-based IDE that gives data scientists and ML engineers a purpose-built interface for managing Ray workloads.
Prerequisites
You need the following before you set up Studio:
-
A HyperPod cluster orchestrated by Amazon EKS. For more information, see Creating a SageMaker HyperPod cluster with Amazon EKS orchestration.
-
The KubeRay operator installed. It reconciles every Ray resource Studio creates. For more information, see Installing KubeRay on HyperPod Amazon EKS.
The following are optional, and each one adds a capability rather than gating the setup:
-
The SageMaker AI Spaces add-on, for interactive development in a JupyterLab or Code Editor space attached to a Ray cluster. For more information, see Setting up the Spaces add-on.
-
The HyperPod Ray Endpoint Operator, for authenticated Ray Dashboard links and remote job submission. For more information, see Installing the HyperPod Ray Endpoint Operator.
Step 1: Create a SageMaker AI domain
Studio access to a HyperPod cluster runs through a SageMaker AI domain, and the domain execution role is the IAM principal Studio uses to act on your cluster. Create the domain and associate it with your cluster by following Setting up an Amazon EKS cluster in Studio.
Step 2: Grant the domain access to your cluster
Cluster access for Studio users is controlled by cluster-access policies attached to the execution role on the domain or the user profile. Only a role with the right policies attached reaches the cluster.
To grant cluster access
-
Open the SageMaker AI console and choose HyperPod clusters, then choose your cluster.
-
On the Configuration tab, find Cluster access for SageMaker domains.
-
Choose Manage access.
-
Select the policies your users need:
-
AmazonSagemakerHyperpodTrainingPolicy—RayCluster,RayJob, andRayCronJob. -
AmazonSagemakerHyperpodInferencePolicy—RayClusterandRayService. -
AmazonSagemakerHyperpodSpacePolicy— spaces, for interactive development. -
AmazonSagemakerHyperpodSpaceTemplatePolicy— space templates. -
AmazonSagemakerHyperpodUserClusterPolicy— cluster visibility for a user.
-
-
Choose whether to scope access to a namespace or to the whole cluster. Scope to a namespace when teams share a cluster.
-
Save.
Granting access this way creates the Amazon EKS access entry for the execution role for you, so there is no separate step in the Amazon EKS console. For the concepts behind the access model, see Setting up Kubernetes role-based access control.
Step 3: Verify
To confirm access
-
Open the Domains page
in the SageMaker AI console and choose your domain. -
Launch Studio for a user profile.
-
Under Compute, select your HyperPod cluster.
-
Choose Tasks.
-
Confirm that you are able to see your Ray workloads.