更新时间:2025-09-12 GMT+08:00
分享

查询应用

使用get命令查询应用的详细信息,该命令同时可用于获取应用模板。

命令结构

ai4s get app ID [flags]
表1 参数说明

参数

简写

是否必选

说明

ID

  • 不选此参数时,列出当前所在空间的所有应用信息。
  • 指定app-id或app-name:version:srcproject,列出具体应用的信息,srcproject为源空间名称,可选。不指定srcproject时,默认为当前空间。例如GATK:4.0:projectname。

--sample

-s

获取应用模板,模板为yaml格式。

--downloadPath

-d

获取应用详情时,将内容下载到的指定文件夹路径(文件夹需要存在)。

--project

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

--label

-l

根据label标签搜索应用。

命令示例

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

  • 使用ai4s get app -s命令获取模板,详细的模板介绍和使用请参见获取应用模板
  • 使用ai4s get app命令查询指定应用信息。
    ai4s  get app  550e8400-e29b-41d4-a716-446655440000
    
    ai4s  get app  app-name:version
    
    get app successfully.
    指定app-id时返回结果:
    app:
      id: f165b7a6-5bc9-11eb-9fef-fa163ef9b34d
      name: lk-app-0121
      version: 1.0.0
      summary: dsfsdf
      description: fdsfsdf
      labels:
      - fdsfsdfsdf
      image: ei_eihealth_xxxx_02/modelarts-base-cpu-py3:custom-2.0.2
      commands:
      - echo lk-app-0121
      resources:
        cpu_type: X86
        cpu: 0.1C
        memory: 0.1G
        gpu_type: ""
        gpu: "0"
      inputs:
      - name: input1
        pattern: asfas
        type: DIRECTORY
        required: false
        description: dasdad
        enum: []
        values: []
      - name: input2
        pattern: ""
        type: FILE
        required: false
        description: ""
        enum: []
        values: []
      outputs:
      - name: output1
        pattern: dsfsdf
        type: DIRECTORY
        required: false
        description: sdfdsf
        values:
        - 空间名称:/sdsds
    
    ai4s get app 91a3bdf6-c445-11ec-a9f3-fa163e507c84 -d ./a
    download app detail successfully!
    
    # 根据label标签搜索应用
    ai4s get app -l  labelA
    id                                        name                version    label                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   source_eihealth_project_name  user_name                      create_time             update_time
    913b4116-aaa2-11ee-a057-fa163ef319da      cli-demo-app        2.0.0      labelA,labelB                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           test-new-project              wwx-test-admin                 2024-01-04 09:42:49     2024-01-04 09:42:49

相关文档