1

I have read in the official documentation that requirements.txt is to be used to install library for sagemaker. However, it also also says that:

For MXNet 1.4.1, requirements.txt is not supported for inference

i am creating a model with the MxnetModel class, specifying a custom script as entry point.

What would be test way to install it? should i "Pip install" into the inference script loaded by sagemaker?

Thanks

Antoine
  • 11
  • 1

1 Answers1

0

I recommend pip installing your dependencies into a specific folder, then packaging them alongside your script in a source dir. You'll also need to reference it in a "dependencies" parameter:

  • pip install my_dependency_name -t my_source_directory_path
  • Model([...], source_dir=my_source_directory_path, dependencies=[my_dependency_name] )

Here's an example: https://github.com/aws/sagemaker-python-sdk/blob/bf48fb1219bd8ea22e78a913bfa091e544c57cc3/tests/integ/test_rl.py#L90

knakad
  • 21
  • 2