ECS load container image from sagemaker built-in algorithm docker path
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?
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.
Relevant questions
Inspection of algorithm containers for Sagemaker
asked 2 months agoECS load container image from sagemaker built-in algorithm docker path
Accepted Answerasked a month agoCan Sagemaker-trained models be deployed to non-Sagemaker endpoints?
asked a year agoAWS SageMaker - Upload our own docker image on Amazon SageMaker
asked 4 months agoSageMaker Multi Model endpoint creation fails while creating for model built on container sagemaker-scikit-learn:0.23-1-cpu-py3
asked 3 days agoExporting Sagemaker model to local computer
asked 2 months agoImage Classification Algorithm Class Activation Map
asked 3 years agoBuild-in Object Detection Algorithm and Sagemaker Neo
asked 3 years agoDoes SageMaker Multi-Model Endpoint support SageMaker Model Monitor?
Accepted AnswerHow to deploy pre-trained model?
asked 3 years ago
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).