Updated on 2023-05-16 GMT+08:00

ma-cli Image Building Command

The ma-cli image command can be used to obtain registered images, obtain or load image creation templates, create images using Dockerfiles, obtain or clear image creation caches, register or deregister images, and debug whether images can be used in notebook instances. For details, run the ma-cli image -h command.

Commands for Creating an Image

$ ma-cli image -h
Usage: ma-cli image [OPTIONS] COMMAND [ARGS]...
  Obtain registered images, register or unregister images, debug images, and create images 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.
Table 1 Commands for creating an image

Command

Description

get-template

Obtain an image creation template.

add-template

Load an image creation template.

get-image

Obtain registered ModelArts images.

register

Register SWR images with ModelArts image management.

unregister

Deregister a registered image from ModelArts image management.

build

Build an image using a Dockerfile (only supported in ModelArts Notebook).

df

Obtain image creation cache, which can only be used in ModelArts notebook.

prune

Clear image creation cache, which can only be used in ModelArts notebook.

debug

Debug an SWR image on an ECS to check whether the image can be used in ModelArts notebook. (Only the ECSs with Docker installed can be used.)