aws-neuron/aws-neuron-sdk

Need to use swap memory for loading (sdxl turbo) model, But I can't set it in sagemaker

Suprhimp opened this issue · 3 comments

Hi, I found that I can't load my model to sagemaker because inside the docker, my model cause OOM while loading in side the sagemaker deploy docker.

I checked that with My EC2 instance inf2.xlarge works well in this environement. (logged with free -m)

this environment the works very well with sdxl turbo
스크린샷 2024-04-03 오전 2 04 45

this environment gives me OOM error.
스크린샷 2024-04-03 오전 2 15 26

Is there any setting that I can use swap memory? especially I want to know How can I allocate swap memory (sagemaker docker env can't use --privilegeflag).

Hi @Suprhimp, will you help provide more information:

  • Version of docker image
  • Are you using SageMaker Notebooks or SageMaker Studio?

https://github.com/aws/deep-learning-containers/blob/master/huggingface/pytorch/inference/docker/1.13/py3/sdk2.15.0/Dockerfile.neuronx

I used this docker image for sagemaker endpoint

I finally give up to use sdxl with neuronx in sagemaker environment 😂

But I build my backend with ec2.

Hello @Suprhimp,

Since this appears to be an issue with SageMaker itself, I suggest you reach out to https://repost.aws/tags/questions/TAT80swPyVRPKPcA0rsJYPuA?view=all.