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

查看:168
本文介绍了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

查看全文

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