Need a docker container with tensorflow v2.13.1 or better in order to create a SageMaker Model

0

I am trained my model using a SageMaker notebook running on us-west-2. The notebook where I trained my model uses tensorflow v2.13.1. I have saved my trained model to S3 and compressed it into a tar.gzip file, but when I try to create a model under SageMaker/Models/CreateModel, it asks for a Container Input Option.

Under create model, I am stuck on Container Input Option. I selected Provide Model Artifacts and inference location and it requests a location of inference code image. I assume this is the location of a prebuilt AWS Docker image that supports tensorflow which would then run my saved model artifacts, but I have no idea where to find the image location, or if this is even the correct option for me.

Cannot seem to find a tutorial that explains the end to end process for deploying a tensor flow model. Lot's of generative AI examples but they all use prebuilt models. I trained my own regression model in SageMaker notebooks, but don't see how I define a model.

My final use case is to create a RestAPI via API Gateway (easy enough), invoke a lambda (also easy), but the part about deploying the model so it can be invoked by my lambda escapes me. My use case maps to serverless inference model architecture.

Update: I have created a model. Next question: how do I invoke this model from a lambda to test it?

1 Answer
0
Accepted Answer

Using the answer from https://repost.aws/questions/QUCnhy2CqIT1KDuw-0zdeZYA/sagemaker-batch-transform-for-a-tensorflow-model#ANvdftNmutTrGC39p0T1BEzA

I added the following docker image (which has tensorflow 2.9, not 2.13) 301217895009.dkr.ecr.us-west-2.amazonaws.com/sagemaker-inference-tensorflow:2.9-cpu-py3

profile picture
answered 10 months ago
profile pictureAWS
EXPERT
reviewed 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions