AWS Serverless Endpoint RAM size issue

0

We are trying to create a Serverless Endpoint at AWS for the Segment Anything (SAM) model. We pulled its image from Docker Hub Docker which is of size 9 GB. AWS Serverless has a maximum RAM size limit of 6 GB. The endpoint RAM size (6 gb) should not be less than model’s size (9 gb).

Is there a way to create an Endpoint for this model?

Since model size is greater, which necessary files should be downloaded from the Docker image so we can create an endpoint with same functionalities?

已提问 5 个月前300 查看次数
2 回答
0
已接受的回答

Hello,

As mentioned in "Container support" and "Memory size" here https://docs.aws.amazon.com/sagemaker/latest/dg/serverless-endpoints.html . The sagemaker serverless endpoint has a memory limitation of ~6GB. Whereas it supports a container of upto 10GB in size.

Kindly consider allocating upto 6GB runtime memory and select this 9GB image and you should not face any issues. In case if this does not suffice your use-case, pleas reconsider by using other suitable services that suffice your use-case or consider consulting with an AWS Solutions Architect.

profile pictureAWS
支持工程师
已回答 5 个月前
profile picture
专家
已审核 2 个月前
0

Not familiar with the Segment Anything Model, however, Lambda functions (which I assume this is what you mean when you wrote AWS serverless), support an image size of up to 10 GB (this is the size of the package, i.e., the amount of code and dependencies). In addition, you can also configure it with up to 10 GB memory (this is the amount of memory your function requires to operate). Note that two values are not related to each other. You can have a small function that requires a lot of memory and a large function that requires a small amount of memory.

profile pictureAWS
专家
Uri
已回答 5 个月前
  • Hi Uri,

    Thanks for your response. I was talking about creating a Serverless Endpoint in Sagemaker that requires a container image of the ML model. The image size should be less than 6 GB or else it will give an error. In my case image size is 9 GB so I think we have to download specific files in an image rather than downloading it completely.

    I tried with a lighter version of the ML model (5 GB in size) and didn’t receive the memory error. Below link shows the complete flow of creating a Sagemaker Endpoint:

    https://drive.google.com/drive/folders/1hwZzZ9v_x7nJMRePuYSuW7VGIRIwOGpe?usp=sharing

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

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

回答问题的准则