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
전문가
검토됨 한 시간 전
  • 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).

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인