ECS load container image from sagemaker built-in algorithm docker path

0

Hello, I'd like to deploy SageMaker's built-in algorithm, BlazingText model on Fargate instead of Sagemaker endpoint. So, I tried to make an ECS task using BlazingText docker path. Here is my CDK code for it.

const loadBalancedFargateService = new ecsPatterns.ApplicationLoadBalancedFargateService(this, 'Service', { memoryLimitMiB: 1024, desiredCount: 1, cpu: 512, taskImageOptions: { image: ecs.ContainerImage.fromRegistry("811284229777.dkr.ecr.us-east-1.amazonaws.com/blazingtext:1"), }, });

However, I got an error: CannotPullContainerError: inspect image has been retried 1 time(s): failed to resolve ref "811284229777.dkr.ecr.us-east-1.amazonaws.com/blazingtext:1": pulling from host 811284229777.dkr.ecr.us-east-1.amazonaws.com failed with status code [manifests 1]...

Is it impossible to pull docker container of sagemaker built-in algorithm from ECS?

1 回答
2
已接受的回答

To my knowledge, no - it's not generally possible to pull the built-in algorithm containers outside SageMaker: Your easiest route would probably just be to deploy the model on SageMaker and integrate your other containerized tasks to call the SageMaker endpoint.

It's maybe worth mentioning that the framework containers for custom/script-mode modelling (e.g. the AWS DLCs for PyTorch/HuggingFace/etc) are not subject to this restriction (can check you should even be able to pull them locally): So if you were to use those to implement a customized text processing model I think you should be able to deploy it on ECS if needed. Of course this'd mean a more initial build and later maintenance effort though.

AWS
专家
Alex_T
已回答 2 年前
profile picture
专家
已审核 12 小时前
  • Thank you so much Alex. I also found deep learning containers(DLC), but there was no container image for the BlazingText algorithm with inference code. The reason why I want to deploy BlazingText model on Fargate is to elastically respond to the varying workload on model endpoint. I think there are two options for my case: 1) selecting a proper instance type with auto scailing, 2) sagemaker serverless endpoint(preview).

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则