更新时间:2022-11-08 GMT+08:00
分享

创建notebook

使用create命令创建notebook。

命令结构

health create notebook <notebook-name> [flags]
表1 参数说明

参数

简写

是否必选

说明

notebook-name

notebook名称。

取值范围[1,63],仅支持小写字母、数字、中划线(-),开始只能是小写字母,结束只能是小写字母或数字。

--description

-d

描述。长度范围为[0,1024]。

--image

-i

notebook镜像,支持PY3或者指定项目中镜像(格式为SourceProjectName/ImageName:TagName)。

若选择PY3,则代表使用系统镜像创建notebook;若选择SourceProjectName/ImageName:TagName,则代表使用自定义镜像创建notebook。

--flavor

-f

flavor规格,格式为cpu:gpu:memory,不填默认为1:0:2,也即其中cpu规格默认1C,范围[1,128],gpu规格默认0,范围[0,16],memory规格默认2G,范围[2,512]。

--storage-path

-s

notebook存储路径。

包含本项目桶最多挂载6个,不包含本项目桶最多挂载5个。

格式为ProjectName:/path,多个路径用分号(;)隔开。

--project

指定项目名。未填写则使用配置文件中的项目名。

命令示例

本节以Windows为例介绍eihealth-toolkit的使用过程,Linux和macOS环境使用方法基本相同,可参考。

  • 创建SYSTEM镜像类型的notebook
    health create notebook lmx-notebook-system -i PY3 -f 1:0:2 -s lmx-test-01:/path1/;lmx-test-02:/path2/
    # 返回结果如下
    create notebook successfully! notebook id is xxx
  • 创建CUSTOMER镜像类型的notebook
    health create notebook lmx-notebook-customer -i lmx-test-01/image1:tag1 -f 1:0:2 -s lmx-test-02:/path1/
    # 返回结果如下
    create notebook successfully! notebook id is xxx
分享:

    相关文档

    相关产品