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?

feita há 5 meses300 visualizações
2 Respostas
0
Resposta aceita

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
ENGENHEIRO DE SUPORTE
respondido há 5 meses
profile picture
ESPECIALISTA
avaliado há 2 meses
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
ESPECIALISTA
Uri
respondido há 5 meses
  • 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

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas