标准化接口参数详情-镜像与 notebook

查镜像仓库/docker构建/镜像/notebook四个模型字段(镜像名、dockerfile、notebook 资源默认值等)时读这篇

06-二次开发 / API参考 / 标准化接口参数详情
镜像仓库repositorydocker镜像构建imagesnotebookjupyter在线IDE

镜像与 notebook 参数详情

字段「默认值/必填/可选值」为后端表单(add/edit_form_extra_fields)静态快照,运行时可能随用户、配置或 _info 接口动态变化,联调时以 $view/api/_info 返回为准。通用调用约定见 README标准化接口

仓库管理

/repository_modelview/api,表名:repository,视图:Repository_ModelView_Api,模型:Repository

源码:myapp/views/view_images.pymyapp/models/model_job.py

新增参数

参数 名称 类型 必填 默认值 唯一 说明 校验/可选值
name name string 英文名
server 服务地址 string(enum) harbor.oa.com/cube-studio/ 镜像仓库地址,示例:REPOSITORY_ORG DataRequired(); Regexp('^[a-zA-Z0-9\-._:@\/]*$'); choices=[['harbor.oa.com/cube-studio/', 'harbor.oa.com/cube-studio/'], ['ccr.ccs.tenc...
user 用户名 string 镜像仓库的用户名 DataRequired()
password 密码 string 镜像仓库的链接密码 DataRequired()
hubsecret hubsecret string k8s secret名

修改参数

参数 名称 类型 必填 默认值 唯一 说明 校验/可选值
name name string 英文名
server 服务地址 string(enum) harbor.oa.com/cube-studio/ 镜像仓库地址,示例:REPOSITORY_ORG DataRequired(); Regexp('^[a-zA-Z0-9\-._:@\/]*$'); choices=[['harbor.oa.com/cube-studio/', 'harbor.oa.com/cube-studio/'], ['ccr.ccs.tenc...
user 用户名 string 镜像仓库的用户名 DataRequired()
password 密码 string 镜像仓库的链接密码 DataRequired()
hubsecret hubsecret string k8s secret名

查看参数

无。

docker构建管理

/docker_modelview/api,表名:docker,视图:Docker_ModelView_Api,模型:Docker

源码:myapp/views/view_docker.pymyapp/models/model_docker.py

新增参数

参数 名称 类型 必填 默认值 唯一 说明 校验/可选值
project project relation 项目组id
describe 描述 string 目标镜像描述 DataRequired()
base_image base_image string 基础镜像
target_image target_image string 目标镜像
consecutive_build consecutive_build boolean True 连续构建
expand 扩展 string expand 扩展参数

修改参数

参数 名称 类型 必填 默认值 唯一 说明 校验/可选值
project project relation 项目组id
describe 描述 string 目标镜像描述 DataRequired()
base_image base_image string 基础镜像
target_image target_image string 目标镜像
consecutive_build consecutive_build boolean True 连续构建
expand 扩展 string expand 扩展参数

查看参数

无。

镜像管理

/images_modelview/api,表名:images,视图:Images_ModelView_Api,模型:Images

源码:myapp/views/view_images.pymyapp/models/model_job.py

新增参数

参数 名称 类型 必填 默认值 唯一 说明 校验/可选值
project project relation 项目组id
repository repository relation 仓库id
name 名称 string 镜像名称全称,例如ubuntu:20.04 DataRequired(); Regexp('^[a-zA-Z0-9\-._:@\/]*$')
describe describe string 描述
dockerfile dockerfile string 镜像的构建Dockerfile全部内容,/mnt/$username/是个人存储目录,可以从此目录下复制文件到镜像中
gitpath gitpath string git地址

修改参数

参数 名称 类型 必填 默认值 唯一 说明 校验/可选值
project project relation 项目组id
repository repository relation 仓库id
name 名称 string 镜像名称全称,例如ubuntu:20.04 DataRequired(); Regexp('^[a-zA-Z0-9\-._:@\/]*$')
describe describe string 描述
dockerfile dockerfile string 镜像的构建Dockerfile全部内容,/mnt/$username/是个人存储目录,可以从此目录下复制文件到镜像中
gitpath gitpath string git地址

查看参数

无。

notebook管理

/notebook_modelview/api,表名:notebook,视图:Notebook_ModelView_Api,模型:Notebook

源码:myapp/views/view_notebook.pymyapp/models/model_notebook.py

⚠️ 已按代码改正:node_selector 表单默认值原文档为 cpu=true,notebook=true,实际为 cpu=true;notebook=true(分号分隔,myapp/views/view_notebook.py:171)。

新增参数

参数 名称 类型 必填 默认值 唯一 说明 校验/可选值
project project relation 项目组id
name name string 英文名
describe describe string 描述
images images string 镜像
working_dir working_dir string 工作目录
volume_mount volume_mount string kubeflow-user-workspace(pvc):/mnt 挂载
resource_memory resource_memory string 10G 申请内存
resource_cpu resource_cpu string 10 申请cpu
resource_gpu resource_gpu string 0 申请gpu
node_selector node_selector string cpu=true;notebook=true 机器选择器

修改参数

无。

查看参数

参数 名称 类型 必填 默认值 唯一 说明 校验/可选值
project project relation 项目组id
name name string 英文名
namespace namespace string jupyter 命名空间
describe describe string 描述
images images string 镜像
working_dir working_dir string 工作目录
env env string 环境变量
volume_mount volume_mount string kubeflow-user-workspace(pvc):/mnt 挂载
resource_memory resource_memory string 10G 申请内存
resource_cpu resource_cpu string 10 申请cpu
resource_gpu resource_gpu string 0 申请gpu
expand expand string {} 扩展参数
node_selector node_selector string cpu=true;notebook=true 机器选择器
status status computed
changed_on changed_on computed
created_on created_on computed
最后更新 2026-06-30完整文档以官方仓库为准:GitHub Wiki