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

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