AWS Sagemaker - 安装外部库并使其持久化 [英] AWS Sagemaker - Install External Library and Make it Persist

查看:27
本文介绍了AWS Sagemaker - 安装外部库并使其持久化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 sagemaker 实例启动并运行,我有一些经常使用的库,但每次我重新启动实例时,它们都会被擦除,我必须重新安装它们.是否可以将我的库安装到 anaconda 环境之一并保留更改?

I have a sagemaker instance up and running and I have a few libraries that I frequently use with it but each time I restart the instance they get wiped and I have to reinstall them. Is it possible to install my libraries to one of the anaconda environments and have the change remain?

推荐答案

支持 Sagemaker 笔记本实例执行此操作的方法是使用 生命周期配置.

The supported way to do this for Sagemaker notebook instances is with Lifecycle Configurations.

您可以创建一个 onStart 生命周期挂钩,它可以在每次笔记本实例启动时将所需的包安装到相应的 Conda 环境中.

You can create an onStart lifecycle hook that can install the required packages into the respective Conda environments each time your notebook instance starts.

请查看以下博文了解更多详情

Please see the following blog post for more details

https://aws.amazon.com/blogs/machine-learning/customize-your-amazon-sagemaker-notebook-instances-with-lifecycle-configurations-and-the-option-to-disable-internet-access/

这篇关于AWS Sagemaker - 安装外部库并使其持久化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆