跳至內容

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??

已提問 2 年前檢視次數 874 次
1 個回答
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"
        }
      ]
    }
  }
}

已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。