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

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

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