aws / sagemaker-pytorch-training-toolkit

Toolkit for running PyTorch training scripts on SageMaker. Dockerfiles used for building SageMaker Pytorch Containers are at https://github.com/aws/deep-learning-containers.
Apache License 2.0
199 stars 88 forks source link

Example use case #227

Open akinolawilson opened 3 years ago

akinolawilson commented 3 years ago

would it possible to have an example use case of this repository?

Would I clone this whilst in the Sagemaker studio? Would it be possible to build an image from this repository and then push it up to the ECR service, following that mount it as an image to my Sagemaker Studio?

ChoiByungWook commented 3 years ago

Hey @akinolawilson,

Thanks for the suggestion!

would it possible to have an example use case of this repository?

As of now, this repository hosts the container side code for enabling training within the SageMaker PyTorch container with the SageMaker Python SDK.

For example, all of the PyTorch examples using the Python SDK for training utilize containers generated from this repository: https://github.com/aws/amazon-sagemaker-examples/tree/master/sagemaker-python-sdk

Would I clone this whilst in the Sagemaker studio? Would it be possible to build an image from this repository and then push it up to the ECR service, following that mount it as an image to my Sagemaker Studio?

For using this image in Studio, I would recommend following:

You would need to do the following:

  1. Build the image from this repository
  2. Push the image to ECR
  3. Create a SageMaker Image and ImageVersion mapping to the ECR Image
  4. Create a SageMaker Studio AppImageConfig
  5. Create/Update your SageMaker Domain

Similar to: https://github.com/aws-samples/sagemaker-studio-custom-image-samples/tree/main/examples/r-image.

You can also extend an existing image, if you don't wish to build the image from this repository.

https://docs.aws.amazon.com/sagemaker/latest/dg/prebuilt-containers-extend.html

Thanks!

akinolawilson commented 3 years ago

@ChoiByungWook thank you so much!