serve icon indicating copy to clipboard operation
serve copied to clipboard

SageMaker does not support 3rd party dependencies isolation

Open lxning opened this issue 1 year ago • 1 comments

🚀 The feature

This feature requests to always create model dir under tmp dir, link with the input model dir, and install 3rd party dependency in the tmp to mitigate the issue that SageMaker does not support 3rd party dependencies isolation. Test step:

  1. create model artifacts with no-archive format (ie. --archive-format no-archive)
torch-model-archiver --model-name sam --version 1.0 --serialized-file workspace/sam/sam_vit_h_4b8939.pth --handler workspace/sam/custom_handler.py --config-file workspace/sam/model-config.yaml --archive-format no-archive
  1. start TS
torchserve --ncs --start --model-store model_store --models sam

Motivation, pitch

SageMaker set /opt/ml/model dir as a model input. This dir is readonly, which means it does not allow TS to install 3rd party dependency in requirements.txt in the model dir.

Alternatives

No response

Additional context

No response

lxning avatar Jul 10 '23 17:07 lxning

@lxning Is there anything else needed for this?

chauhang avatar Oct 23 '23 19:10 chauhang