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

ma-cli image镜像构建命令概述

ma-cli image命令支持:查询用户已注册的镜像、查询/加载镜像构建模板、Dockerfile镜像构建、查询/清理镜像构建缓存、注册/取消注册镜像、调试镜像是否可以在Notebook中使用等。具体命令及功能可执行ma-cli image -h命令查看。

镜像构建命令总览

$ ma-cli image -h
Usage: ma-cli image [OPTIONS] COMMAND [ARGS]...
  Support get registered image list, register or unregister image, debug image, build image in Notebook.

Options:
  -H, -h, --help  Show this message and exit.

Commands:
  add-template, at  List build-in dockerfile templates.
  build             Build docker image in Notebook.
  debug             Debug SWR image as a Notebook in ECS.
  df                Query disk usage.
  get-image, gi     Query registered image in ModelArts.
  get-template, gt  List build-in dockerfile templates.
  prune             Prune image build cache.
  register          Register image to ModelArts.
  unregister        Unregister image from ModelArts.
表1 镜像构建支持的命令

命令

命令详情

get-template

查询镜像构建模板。

add-template

加载镜像构建模板。

get-image

查询ModelArts已注册镜像。

register

注册SWR镜像到ModelArts镜像管理。

unregister

取消注册ModelArts镜像管理中的已注册镜像。

build

基于指定的Dockerfile构建镜像 (只支持ModelArts Notebook里使用)。

df

查询镜像构建缓存(只支持ModelArts Notebook里使用)。

prune

清理镜像构建缓存 (只支持ModelArts Notebook里使用)。

debug

在ECS上调试SWR镜像是否能在ModelArts Notebook中使用 (只支持已安装docker环境的ECS)。