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

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

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