You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

09-Dubhe-Patch.sql 8.4 kB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. -- DML 脚本
  2. use `dubhe-cloud-prod`;
  3. ALTER TABLE `pt_train_param`
  4. ADD COLUMN algorithm_usage varchar(255) NULL DEFAULT '' COMMENT '算法用途',
  5. ADD COLUMN val_algorithm_usage varchar(255) NULL DEFAULT '' COMMENT '验证数据集算法用途';
  6. ALTER TABLE `pt_job_param`
  7. ADD COLUMN algorithm_usage varchar(255) NULL DEFAULT '' COMMENT '算法用途',
  8. ADD COLUMN val_algorithm_usage varchar(255) NULL DEFAULT '' COMMENT '验证数据集算法用途';
  9. INSERT INTO `permission` (`pid`, `name`, `permission`, `create_user_id`, `update_user_id`
  10. , `deleted`)
  11. SELECT id, '编辑用户配置'
  12. , 'system:user:configEdit', 1, 1, b'0'
  13. FROM `permission`
  14. WHERE `name` = '用户管理';
  15. UPDATE `permission`
  16. SET `pid` = 1
  17. WHERE `id` = 2;
  18. CREATE TABLE `user_config` (
  19. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
  20. `user_id` bigint(20) NOT NULL COMMENT '用户id',
  21. `notebook_delay_delete_time` int(10) NOT NULL COMMENT '定时任务延迟删除 Notebook 时间配置,单位:小时',
  22. `cpu_limit` int(10) NOT NULL COMMENT '用户CPU资源限制配置,单位:核',
  23. `memory_limit` int(10) NOT NULL COMMENT '用户内存资源限制配置,单位:Gi',
  24. `gpu_limit` int(10) NOT NULL COMMENT '用户显卡资源限制配置,单位:块',
  25. `create_user_id` bigint(20) DEFAULT NULL COMMENT '创建人',
  26. `update_user_id` bigint(20) DEFAULT NULL COMMENT '更新人',
  27. `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  28. `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  29. `deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除(0正常,1已删除)',
  30. PRIMARY KEY USING BTREE (`id`),
  31. UNIQUE KEY `user_id_unique` USING BTREE (`user_id`),
  32. KEY `user_id` USING BTREE (`create_user_id`)
  33. ) ENGINE = InnoDB AUTO_INCREMENT = 51 CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMMENT '用户配置表';
  34. INSERT INTO `permission` (`pid`, `name`, `permission`, `create_user_id`, `update_user_id`
  35. , `deleted`)
  36. SELECT id, '查询用户资源信息'
  37. , 'system:user:resourceInfo', 1, 1, b'0'
  38. FROM `permission`
  39. WHERE `name` = '用户管理';
  40. DELETE FROM dict
  41. WHERE id IN (35, 36);
  42. DELETE FROM dict_detail
  43. WHERE dict_id IN (35, 36);
  44. ALTER TABLE `notebook`
  45. ADD COLUMN `pip_site_package_path` VARCHAR(255) NULL COMMENT 'pip包路径';
  46. CREATE TABLE IF NOT EXISTS `terminal` (
  47. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  48. `name` varchar(255) DEFAULT NULL COMMENT '名称',
  49. `image_name` varchar(127) DEFAULT '' COMMENT '镜像名',
  50. `image_tag` varchar(64) DEFAULT '' COMMENT '镜像版本',
  51. `image_url` varchar(255) DEFAULT '' COMMENT '镜像全路径',
  52. `data_source_name` varchar(127) DEFAULT NULL COMMENT '数据集名称',
  53. `data_source_path` varchar(127) DEFAULT NULL COMMENT '数据集路径',
  54. `running_node` tinyint(3) UNSIGNED DEFAULT '0' COMMENT '运行节点数',
  55. `total_node` tinyint(3) UNSIGNED DEFAULT '0' COMMENT '服务总节点数',
  56. `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '服务状态:0-异常,1-保存中,2-运行中,3-已停止',
  57. `status_detail` json DEFAULT NULL COMMENT '状态对应的详情信息',
  58. `description` varchar(255) DEFAULT NULL COMMENT '描述',
  59. `same_info` bit(1) DEFAULT b'0' COMMENT '节点规格是否相同:0相同 1:不同',
  60. `last_start_time` timestamp NULL DEFAULT NULL COMMENT '上次启动执行时间',
  61. `last_stop_time` timestamp NULL DEFAULT NULL COMMENT '上次停止执行时间',
  62. `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  63. `create_user_id` bigint(20) DEFAULT NULL,
  64. `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  65. `update_user_id` bigint(20) DEFAULT NULL,
  66. `deleted` bit(1) DEFAULT b'0',
  67. `origin_user_id` bigint(20) DEFAULT NULL COMMENT '资源拥有人ID',
  68. PRIMARY KEY USING BTREE (`id`),
  69. KEY `deleted` (`deleted`)
  70. ) ENGINE = InnoDB CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMMENT '专业版终端业务表';
  71. CREATE TABLE IF NOT EXISTS `terminal_info` (
  72. `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  73. `terminal_id` bigint(20) NOT NULL COMMENT 'terminal主键',
  74. `name` varchar(255) DEFAULT NULL COMMENT '名称',
  75. `k8s_resource_name` varchar(64) DEFAULT NULL COMMENT 'k8s 资源名称',
  76. `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '服务状态:0-异常,1-调度中,2-运行中,3-已停止',
  77. `status_detail` json DEFAULT NULL COMMENT '状态对应的详情信息',
  78. `ssh` varchar(64) DEFAULT NULL COMMENT 'ssh命令',
  79. `ssh_password` varchar(64) DEFAULT NULL COMMENT 'ssh 密码',
  80. `cpu_num` int(11) NOT NULL DEFAULT '0' COMMENT 'CPU数量(核)',
  81. `gpu_num` int(11) NOT NULL DEFAULT '0' COMMENT 'GPU数量(核)',
  82. `mem_num` int(11) NOT NULL DEFAULT '0' COMMENT '内存大小(M)',
  83. `disk_mem_num` int(11) NOT NULL DEFAULT '0' COMMENT '磁盘大小(M)',
  84. `pod_ip` varchar(64) DEFAULT NULL COMMENT 'pod ip',
  85. `ssh_port` int(11) DEFAULT NULL COMMENT 'ssh端口',
  86. `ssh_user` varchar(32) DEFAULT NULL COMMENT 'ssh 用户',
  87. `master_flag` bit(1) DEFAULT b'0' COMMENT '是否master节点:0 否 1:是',
  88. `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  89. `create_user_id` bigint(20) DEFAULT NULL,
  90. `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  91. `update_user_id` bigint(20) DEFAULT NULL,
  92. `deleted` bit(1) DEFAULT b'0',
  93. `origin_user_id` bigint(20) DEFAULT NULL COMMENT '资源拥有人ID',
  94. PRIMARY KEY USING BTREE (`id`),
  95. KEY `status` (`status`),
  96. KEY `deleted` (`deleted`)
  97. ) ENGINE = InnoDB CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMMENT '专业版终端业务详情表';
  98. INSERT INTO `menu` (`pid`, `type`, `name`, `icon`, `path`
  99. , `component`, `component_name`, `layout`, `permission`, `hidden`
  100. , `cache`, `sort`, `create_user_id`, `update_user_id`, `deleted`
  101. , `back_to`, `ext_config`)
  102. VALUES (0, 0, '天枢专业版', 'terminal', 'terminal'
  103. , NULL, NULL, NULL, 'terminal', b'0'
  104. , b'0', 80, 3, 3, b'0'
  105. , NULL, NULL);
  106. INSERT INTO `menu` (`pid`, `type`, `name`, `icon`, `path`
  107. , `component`, `component_name`, `layout`, `permission`, `hidden`
  108. , `cache`, `sort`, `create_user_id`, `update_user_id`, `deleted`
  109. , `back_to`, `ext_config`)
  110. VALUES (last_insert_id(), 1, '终端概览', 'overview', 'overview'
  111. , 'terminal/overview', 'TerminalOverview', 'BaseLayout', 'terminal:terminals', b'0'
  112. , b'0', 81, 3, 3, b'0'
  113. , NULL, '{}'),
  114. (last_insert_id(), 1, '远程连接', 'remote', 'remote'
  115. , 'terminal/remote', 'TerminalRemote', 'BaseLayout', 'terminal:remote', b'0'
  116. , b'0', 82, 3, 3, b'0'
  117. , NULL, '{}');
  118. INSERT INTO `roles_menus` (`role_id`, `menu_id`) VALUES (1, last_insert_id());
  119. ALTER TABLE `pt_image`
  120. ADD COLUMN `ssh_pwd` varchar(64) COMMENT '镜像ssh密码',
  121. ADD COLUMN `ssh_user` varchar(64) COMMENT '镜像ssh用户';
  122. create table k8s_task_identify
  123. (
  124. id bigint auto_increment primary key,
  125. task_id bigint not null comment '任务id',
  126. task_name varchar(64) not null comment '任务名称',
  127. create_user_id bigint null comment '创建人id',
  128. update_user_id bigint null comment '修改人id',
  129. create_time datetime default CURRENT_TIMESTAMP null,
  130. update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP,
  131. deleted bit default b'0' null comment '删除标记 0正常,1已删除'
  132. );
  133. ALTER TABLE
  134. `pt_job_param`
  135. add
  136. column notebook_name varchar(255) default null null comment 'notebook名称';

一站式算法开发平台、高性能分布式深度学习框架、先进算法模型库、视觉模型炼知平台、数据可视化分析平台等一系列平台及工具,在模型高效分布式训练、数据处理和可视分析、模型炼知和轻量化等技术上形成独特优势,目前已在产学研等各领域近千家单位及个人提供AI应用赋能