Skip to content

Can't view my custom images in Sagemaker JupyterLab and Shared spaces

0

Hello, I create Sagemaker domain and want to use shared space for my team with custom image. I build this image and push to ECR, after that attach it to the domain, but I can't see it nor on private space nor in shared. I also add via AWS API images using json file as it suggested , but and it is work if I write for JupyterLab the following part of config (and this works only for private space): "JupyterLabAppSettings": { "CustomImages": [ { "AppImageConfigName": "app-image-config-1709543896355", "ImageName": "baseimage", "ImageVersionNumber": 1 } ], "DefaultResourceSpec": { "InstanceType": "ml.t3.medium", "SageMakerImageArn": "arn:aws:sagemaker:us-east-1:xxxxx:image/baseimage", "SageMakerImageVersionAlias": "1", "SageMakerImageVersionArn": "arn:aws:sagemaker:us-east-1:xxxxx:image-version/baseimage/1" }, "LifecycleConfigArns": [ "arn:aws:sagemaker:us-east-1:xxxxx:studio-lifecycle-config/autostop1hour" ] }

And I don't know which app-image-config should be pasted. Also, isn't here more comfortable methods to attach to my spaces custom images??

asked 2 years ago848 views
1 Answer
0

Hi,

I had a similar issue and solved it by adding the custom images to the DefaultSpaceSettings as well.

  1. Describe your domain to get the aws sagemaker describe-domain --domain-id <YOUR_DOMAIN_ID>. Here you should see your DefaultUserSettings containing your custom images.
  2. Add the custom image to the DefaultSpaceSettings as well as DefaultUserSettings.
  3. Update the domain with the new JSON aws sagemaker update-domain --domain-id <YOUR_DOMAIN_ID> --cli-input-json file://file.json

NOTE this only worked once I the aws-cli upgraded from 2.17.42 to 2.15.37

https://docs.aws.amazon.com/cli/latest/reference/sagemaker/update-domain.html https://awscli.amazonaws.com/v2/documentation/api/latest/reference/sagemaker/describe-domain.html

{
  "DefaultUserSettings": {
    "ExecutionRole": "arn:aws:iam::XYZ:role/YOUR_ROLE",
    "JupyterLabAppSettings": {
      "CustomImages": [
        {
          "ImageName": "r-base",
          "ImageVersionNumber": 1,
          "AppImageConfigName": "XYZ"
        }
      ],
      "LifecycleConfigArns": []
    }
  },

  "DefaultSpaceSettings": {
    "ExecutionRole": "arn:aws:iam::XYZ:role/YOUR_ROLE",
    "JupyterLabAppSettings": {
      "CustomImages": [
        {
          "ImageName": "r-base",
          "ImageVersionNumber": 1,
          "AppImageConfigName": "XYZ"
        }
      ]
    }
  }
}

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.