更新时间:2023-05-05 GMT+08:00
分享

在ModelArts Notebook中清理镜像构建缓存

使用ma-cli image prune命令清理镜像构建缓存,仅支持在ModelArts Notebook里使用该命令。

$ ma-cli image prune -h
Usage: ma-cli image prune [OPTIONS]

  Prune image build cache by image-building in Notebook.

  Example:

  # Prune image build cache
  ma-cli image prune

Options:
  -ks, --keep-storage INTEGER  Amount of disk space to keep for cache below this limit (in MB) (default: 0).
  -kd, --keep-duration TEXT    Keep cache newer than this limit, support second(s), minute(m) and hour(h) (default:   0s).
  -v, --verbose                Show more verbose output.
  -D, --debug                  Debug Mode. Shows full stack trace when error occurs.  
  -h, -H, --help               Show this message and exit.
表1 参数说明

参数名

参数类型

是否必选

参数说明

-ks / --keep-storage

Int

清理缓存时保留的缓存大小,单位是MB,默认是0,表示全部清理。

-kd / --keep-duration

String

清理缓存时保留较新的缓存,只清除历史缓存,单位为s(秒)、m(分钟)、h(小时),默认是0s,表示全部清理。

-v / --verbose

Bool

显示详细的信息开关,默认关闭。

示例

清理保留1MB镜像缓存。

ma-cli image prune -ks 1

分享:

    相关文档

    相关产品