- Newest
- Most votes
- Most comments
if you stop a notebook instance, you will lose any changes you made to the Conda environment or installed packages in that session. If you want to keep your changes, you can either create a persistent Conda environment or save your work to a persistent storage location.
Here are some additional details about the implications of stopping a notebook instance:
- Any data that is stored in the notebook's ephemeral storage (such as the /tmp directory) will be lost.
- Any running processes will be terminated.
- Any changes you made to the notebook's configuration will be lost.
Solution:
- Use Lifecycle Configurations with Amazon SageMaker Studio
- You can also use premade script from this GitHub repo
- Step by Step Guide to create a Lifecycle Configuration from SageMaker Console.
When you stop a notebook, SageMaker terminates the notebook's Amazon Elastic Compute Cloud (Amazon EC2) instance. Non-persistent Conda environments and the packages installed don't persist between sessions. SageMaker domains and Studio use an EFS volume as a persistent storage layer. You can save your Conda environments on this EFS volume. These environments are persistent between kernel, app, or Studio restart. Studio automatically picks up all environments as KernelGateway kernels.
To Create persistent Conda environments on a Studio EFS volume, please refer the AWS article [1] and GitHub [2] which guides you through step-by-step process along with detailed instructions.
References :
[1] https://aws.amazon.com/blogs/machine-learning/four-approaches-to-manage-python-packages-in-amazon-sagemaker-studio-notebooks/#:~:text=Persist%20Conda%20environments%20to%20the%20Studio%20EFS%20volume
[2] https://github.com/durgasury/efs_backed_conda
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 2 years ago