

# Setting up the Spaces add-on
<a name="sagemaker-hyperpod-ray-spaces-addon-setup"></a>

The SageMaker Spaces add-on provides the IDE and notebook spaces that attach to a Ray cluster. You install it from the console, then configure web browser access so users open a space in a browser.

## Prerequisites
<a name="sagemaker-hyperpod-ray-spaces-addon-setup-prereqs"></a>
+ A HyperPod cluster orchestrated by Amazon EKS. For more information, see [Creating a SageMaker HyperPod cluster with Amazon EKS orchestration](https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-hyperpod-eks-operate-console-ui-create-cluster.html).

The following are optional. You need them for web browser access to a space, and for Ray Dashboard access through the Ray Endpoint Operator:
+ A customer-owned domain with a public Amazon Route 53 hosted zone, an AWS Certificate Manager certificate for that domain, and an AWS AWS KMS key that signs access tokens.

## Install the add-on
<a name="sagemaker-hyperpod-ray-spaces-addon-setup-install"></a>

**To install the Spaces add-on**

1. In the console, open your HyperPod cluster and choose the **IDE and Notebooks** tab.

1. For the Spaces add-on, choose **Quick Install** to apply the default configuration, or **Custom install** to change it.

For the detailed steps and the options each path exposes, see [Install SageMaker AI Spaces Add-on](https://docs.aws.amazon.com/sagemaker/latest/dg/operator-install.html) and [Customize add-on](https://docs.aws.amazon.com/sagemaker/latest/dg/customization.html).

**Important**  
Ray interactive development requires version 0.2.0 or later of the Spaces add-on. Earlier versions do not include it. If you already installed an earlier version, upgrade it before you attach a space to a Ray cluster.

## Ray integration configuration
<a name="sagemaker-hyperpod-ray-spaces-addon-setup-rayconfig"></a>

The add-on turns on Ray integration with the following defaults. Change them in the add-on configuration when your workload needs different values.

```
{
  "jupyter-k8s-aws-hyperpod": {
    "rayIntegration": {
      "enabled": true,
      "objectStoreMemory": "1073741824",
      "devShmSizeLimit": "1Gi",
      "sidecar": {
        "runAsUser": 1000,
        "runAsGroup": 100,
        "resources": {
          "requests": { "cpu": "250m", "memory": "512Mi" },
          "limits": { "cpu": "1", "memory": "1536Mi" }
        }
      }
    }
  }
}
```

## Configure web browser access
<a name="sagemaker-hyperpod-ray-spaces-addon-setup-web"></a>

Web browser access is optional. Configure it when you want users to open a space in a browser, or to reach the Ray Dashboard from a browser.

**Important**  
Web browser access requires a customer-owned domain and a public Route 53 hosted zone. Without them you cannot open a space in a browser, and the Ray Endpoint Operator cannot serve the Ray Dashboard. For more information about dashboard access, see [Ray Dashboard access and remote job submission](sagemaker-hyperpod-ray-dashboard.md).

Web browser access needs the Route 53 hosted zone, the ACM certificate, and the AWS KMS key from the prerequisites. For the configuration steps, see [Web browser access](https://docs.aws.amazon.com/sagemaker/latest/dg/browser-access.html). For the domain and certificate setup, see [Custom certificates and Route 53 DNS](https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-hyperpod-model-deployment-custom-certs.html).

## Verify
<a name="sagemaker-hyperpod-ray-spaces-addon-setup-verify"></a>

Confirm the add-on reports **Active** on the **IDE and Notebooks** tab before you attach a space. Check that its version is 0.2.0 or later.