I wanted to know how I can pre-install Python packages in Sagemaker before spinning it up?
For example, I want to install Tensorfliw, LightFM, and Scikit-optimize
How can i code a Lifecycle Configuration file which will tell sagemaker to install these packages before it spins up and have it ready when I am ready to code.
I know the following resources:
Lifecycle Configurations are shell scripts triggered by Amazon SageMaker Studio lifecycle events, such as starting a new Studio notebook. You can use Lifecycle Configurations to automate customization for your Studio environment.
SageMaker notebooks support the following package installation tools: conda install. pip install.
SageMaker does not allow you to schedule training jobs. SageMaker does not provide a mechanism for easily tracking metrics logged during training. We often fit feature extraction and model pipelines. We can inject the model artifacts into AWS-provided containers, but we cannot inject the feature extractors.
For Tensorflow, there is an existing Conda environment(tensorflow_p36) with TensorFlow preinstalled that you can use. For other packages that aren't present by default, you can use this Lifecycle Configuration script sample to install them into the tensorflow_p36 environment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With