本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
清理 资源
您可以执行以下步骤来清理在前面部分中创建的资源:
从域中分离图像和图像版本。
删除映像、映像版本和应用程序映像配置。
从 Amazon ECR 中删除容器映像和存储库。有关更多信息,请参阅 。删除存储库.
清除资源
-
通过将空的自定义映像列表传递给域名,从域中分离图像和映像版本。打开
default-user-settings.json
你在中创建的文件将图像附加到当前域. -
删除自定义映像,然后保存文件。
"DefaultUserSettings": { "KernelGatewayAppSettings": { "CustomImages": [ ], ... }, ... }
-
使用域 ID 和默认用户设置文件更新您的域。
aws sagemaker update-domain \ --domain-id
<d-xxxxxxxxxxxx>
\ --cli-input-json file://default-user-settings.json响应:
{ "DomainArn": "arn:aws:sagemaker:us-east-2:acct-id:domain/d-xxxxxxxxxxxx" }
-
删除应用程序映像配置。
aws sagemaker delete-app-image-config \ --app-image-config-name r-image-config
-
删除存储在设备上的 SageMaker 映像,它还会删除所有映像版本。不会删除由映像版本表示的 ECR 中的容器镜像。
aws sagemaker delete-image \ --image-name r-image