From 2cc11a4441a066223c5f6704505d16fa1fb59586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=8A=A0=E8=BF=9C?= Date: Mon, 9 Jan 2023 16:53:39 +0800 Subject: [PATCH 01/20] support xilinx fpga --- .../templates/xilinx-device-plugin.yaml | 65 +++++++++++++++++++ deploy/charts/octopus/values.yaml | 7 +- deploy/single_master_k8s_install/comm.sh | 8 +++ .../master_install_k8s.sh | 2 + .../node_install_k8s.sh | 2 + 5 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 deploy/charts/octopus/templates/xilinx-device-plugin.yaml diff --git a/deploy/charts/octopus/templates/xilinx-device-plugin.yaml b/deploy/charts/octopus/templates/xilinx-device-plugin.yaml new file mode 100644 index 00000000..85c1d9ff --- /dev/null +++ b/deploy/charts/octopus/templates/xilinx-device-plugin.yaml @@ -0,0 +1,65 @@ +#Copyright 2018-2022 Xilinx Corporation. All Rights Reserved. +# +#Licensed under the Apache License, Version 2.0 (the "License"); +#you may not use this file except in compliance with the License. +#You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +#Unless required by applicable law or agreed to in writing, software +#distributed under the License is distributed on an "AS IS" BASIS, +#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +#See the License for the specific language governing permissions and +#limitations under the License. + +{{- if .Values.xilinx.enabled }} +apiVersion: apps/v1 +#if run with k8s v1.16-, replace the above line with +#apiVersion: extensions/v1beta1 +kind: DaemonSet +metadata: + name: xilinx-device-plugin-daemonset + namespace: kube-system +spec: + #if run with k8s v1.16-, the following 3 lines are not required + selector: + matchLabels: + name: xilinx-device-plugin-ds + updateStrategy: + type: RollingUpdate + template: + metadata: + annotations: + scheduler.alpha.kubernetes.io/critical-pod: "" + labels: + name: xilinx-device-plugin-ds + spec: + tolerations: + - key: CriticalAddonsOnly + operator: Exists + - key: xilinx.com/fpga + operator: Exists + effect: NoSchedule + nodeSelector: + hardware-type: XILINXFPGA + containers: + - image: {{ .Values.xilinx.fpgaDevicePluginImage }} + name: xilinx-device-plugin-ctr + imagePullPolicy: IfNotPresent + env: + - name: U30NameConvention + value: CommonName + - name: U30AllocUnit + value: Card + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: ["ALL"] + volumeMounts: + - name: device-plugin + mountPath: /var/lib/kubelet/device-plugins + volumes: + - name: device-plugin + hostPath: + path: /var/lib/kubelet/device-plugins +{{- end }} \ No newline at end of file diff --git a/deploy/charts/octopus/values.yaml b/deploy/charts/octopus/values.yaml index 1c739a2a..e1f65276 100644 --- a/deploy/charts/octopus/values.yaml +++ b/deploy/charts/octopus/values.yaml @@ -511,4 +511,9 @@ cambricon: nvidia: # nvidia节点需要打标签hardware-type=NVIDIAGPU - enabled: true \ No newline at end of file + enabled: true + +xilinx: + # xilinx节点需要打标签hardware-type=XILINXFPGA + enabled: false + fpgaDevicePluginImage: public.ecr.aws/xilinx_dcg/k8s-device-plugin:1.1.0 \ No newline at end of file diff --git a/deploy/single_master_k8s_install/comm.sh b/deploy/single_master_k8s_install/comm.sh index f4be7152..4c4e697b 100644 --- a/deploy/single_master_k8s_install/comm.sh +++ b/deploy/single_master_k8s_install/comm.sh @@ -248,6 +248,14 @@ cambricon_mlu_label() { echo -e "---------------------\033[31m cambricon mlu label success \033[0m---------------------" } +# xilinx fpga节点打标签 +xilinx_fpga_label() { + set -e + echo -e "---------------------\033[31m xilinx fpga label \033[0m---------------------" + kubectl label nodes `hostname` hardware-type=XILINXFPGA + echo -e "---------------------\033[31m xilinx fpga label success \033[0m---------------------" +} + # huawei a910节点打标签 huawei_a910_label() { kubectl label nodes `hostname` a910-device-plugin=active diff --git a/deploy/single_master_k8s_install/master_install_k8s.sh b/deploy/single_master_k8s_install/master_install_k8s.sh index 63c0884c..b7fc8da1 100644 --- a/deploy/single_master_k8s_install/master_install_k8s.sh +++ b/deploy/single_master_k8s_install/master_install_k8s.sh @@ -120,6 +120,8 @@ main() { enflame_gcu_label elif [[ $node_type == "cambricon_mlu" ]];then cambricon_mlu_label + elif [[ $node_type == "xilinx_fpga" ]];then + xilinx_fpga_label fi # 验证 diff --git a/deploy/single_master_k8s_install/node_install_k8s.sh b/deploy/single_master_k8s_install/node_install_k8s.sh index 771be82b..acd105a4 100644 --- a/deploy/single_master_k8s_install/node_install_k8s.sh +++ b/deploy/single_master_k8s_install/node_install_k8s.sh @@ -88,6 +88,8 @@ main() { enflame_gcu_label elif [[ $node_type == "cambricon_mlu" ]];then cambricon_mlu_label + elif [[ $node_type == "xilinx_fpga" ]];then + xilinx_fpga_label fi } -- 2.34.1 From b0ad525e386dd522ea4719f014c77c7f8c6d5ae3 Mon Sep 17 00:00:00 2001 From: denglei <2522636547@qq.com> Date: Tue, 14 Mar 2023 15:24:58 +0800 Subject: [PATCH 02/20] =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- openai-portal/src/permission.js | 2 +- openai-portal/vue.config.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openai-portal/src/permission.js b/openai-portal/src/permission.js index 6523677d..a363f6b6 100644 --- a/openai-portal/src/permission.js +++ b/openai-portal/src/permission.js @@ -25,7 +25,7 @@ router.beforeEach(async (to, from, next) => { if (hasToken) { try { // eslint-disable-next-line eqeqeq - if (store.getters.name === '') { await store.dispatch('user/getInfo') } + await store.dispatch('user/getInfo') if (store.getters.workspaces.length === 0) { await store.dispatch('user/getSpace') } } catch (error) { await store.dispatch('user/resetToken') diff --git a/openai-portal/vue.config.js b/openai-portal/vue.config.js index 444bc2a4..bdf08c0b 100644 --- a/openai-portal/vue.config.js +++ b/openai-portal/vue.config.js @@ -42,14 +42,14 @@ module.exports = { }, proxy: { [process.env.VUE_APP_BASE_API]: { - target: 'http://192.168.202.71/', + target: 'http://192.168.202.73/', changeOrigin: true, pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: '/openaiserver' } }, [process.env.VUE_APP_BASE_API2]: { - target: 'http://192.168.202.71/', + target: 'http://192.168.202.73/', changeOrigin: true, pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: '' -- 2.34.1 From 9f139e155806c2ad274dd8b4a2275fdb82805e56 Mon Sep 17 00:00:00 2001 From: linfengjun Date: Tue, 14 Mar 2023 16:11:36 +0800 Subject: [PATCH 03/20] =?UTF-8?q?notebook=E5=90=AF=E5=8A=A8=E6=97=B6?= =?UTF-8?q?=E6=8F=92=E5=85=A5influxdb=E5=87=BA=E9=94=99=E6=97=B6=E4=B8=8D?= =?UTF-8?q?=E5=9B=9E=E6=BB=9A=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/base-server/internal/service/develop/develop.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/base-server/internal/service/develop/develop.go b/server/base-server/internal/service/develop/develop.go index 77f5061b..0036fafa 100644 --- a/server/base-server/internal/service/develop/develop.go +++ b/server/base-server/internal/service/develop/develop.go @@ -532,12 +532,12 @@ func (s *developService) StartNotebook(ctx context.Context, req *api.StartNotebo } }() - err = s.data.DevelopDao.CreateNotebookEventRecord(ctx, &model.NotebookEventRecord{ + err1 := s.data.DevelopDao.CreateNotebookEventRecord(ctx, &model.NotebookEventRecord{ Time: time.Now(), NotebookId: nb.Id, Type: commapi.NotebookEventRecordType_START, }) - if err != nil { // 插入事件记录出错只打印 + if err1 != nil { // 插入事件记录出错只打印 s.log.Error(ctx, "create notebook event record error:", err) } -- 2.34.1 From 38535a4812c6cc27a2a3efbd8ed358549d9ad7e5 Mon Sep 17 00:00:00 2001 From: denglei <2522636547@qq.com> Date: Thu, 23 Mar 2023 17:53:48 +0800 Subject: [PATCH 04/20] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=88=86=E5=B8=83?= =?UTF-8?q?=E5=BC=8F=E9=94=81=E4=BB=BB=E5=8A=A1bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/createDialog/traningList.vue | 3 +- .../components/editDialog/traningList.vue | 35 +++++++------------ 2 files changed, 14 insertions(+), 24 deletions(-) diff --git a/openai-portal/src/views/trainingManager/components/createDialog/traningList.vue b/openai-portal/src/views/trainingManager/components/createDialog/traningList.vue index e05c11f4..a9509260 100644 --- a/openai-portal/src/views/trainingManager/components/createDialog/traningList.vue +++ b/openai-portal/src/views/trainingManager/components/createDialog/traningList.vue @@ -118,10 +118,11 @@ val.taskNumber = parseInt(val.taskNumber) val.minFailedTaskCount = parseInt(val.minFailedTaskCount) val.minSucceededTaskCount = parseInt(val.minSucceededTaskCount) - this.tableData[this.currentIndex] = val + // this.tableData[this.currentIndex] = val // flag为true新增 // flag为false编辑 if (this.flag) { this.tableData.push(val); } + else{ this.tableData[this.currentIndex] = val} }, showResource(row) { let name = '' diff --git a/openai-portal/src/views/trainingManager/components/editDialog/traningList.vue b/openai-portal/src/views/trainingManager/components/editDialog/traningList.vue index 8ea00e76..a56146e6 100644 --- a/openai-portal/src/views/trainingManager/components/editDialog/traningList.vue +++ b/openai-portal/src/views/trainingManager/components/editDialog/traningList.vue @@ -2,12 +2,8 @@
添加 - + @@ -65,8 +53,8 @@ default: () => [] }, resourcePool: { - type: String, - default: () => "" + type: String, + default: () => "" } }, data() { @@ -84,7 +72,7 @@ this.$emit('tableData', this.tableData) }, resourcePool() { - this.getResourceList() + this.getResourceList() } }, created() { @@ -97,7 +85,7 @@ this.flag = true this.row = { parameters: [] } }, - handleEdit(index,row) { + handleEdit(index, row) { this.currentIndex = index this.FormVisible = true this.row = row @@ -120,11 +108,12 @@ val.taskNumber = parseInt(val.taskNumber) val.minFailedTaskCount = parseInt(val.minFailedTaskCount) val.minSucceededTaskCount = parseInt(val.minSucceededTaskCount) - this.tableData[this.currentIndex] = val + // flag为true新增 // flag为false编辑 if (this.flag) { this.tableData.push(val); } + else { this.tableData[this.currentIndex] = val } }, showResource(row) { let name = '' @@ -152,7 +141,7 @@ } }) }, - command: function(data) { + command: function (data) { let command = data.command if (data.parameters != null && data.parameters.length != 0) { data.parameters.forEach( -- 2.34.1 From 37588538137502f0ca0464a758f7684cf4edb3af Mon Sep 17 00:00:00 2001 From: denglei <2522636547@qq.com> Date: Wed, 29 Mar 2023 15:25:54 +0800 Subject: [PATCH 05/20] =?UTF-8?q?=E6=BB=9A=E5=8A=A8=E6=9D=A1bug=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modelManager/components/createDialog.vue | 4 +--- .../views/userManager/components/addDialog.vue | 7 +++---- deploy/charts/octopus/charts/fluid-0.8.0.tgz | Bin 0 -> 117179 bytes .../trainingTaskCreate.vue | 4 +--- 4 files changed, 5 insertions(+), 10 deletions(-) create mode 100644 deploy/charts/octopus/charts/fluid-0.8.0.tgz diff --git a/admin-portal/src/views/modelManager/components/createDialog.vue b/admin-portal/src/views/modelManager/components/createDialog.vue index 48fd215c..b0980cd4 100644 --- a/admin-portal/src/views/modelManager/components/createDialog.vue +++ b/admin-portal/src/views/modelManager/components/createDialog.vue @@ -64,10 +64,8 @@ inserted: function(el, binding) { const SELECTWRAP_DOM = el.querySelector('.el-select-dropdown .el-select-dropdown__wrap'); SELECTWRAP_DOM.addEventListener('scroll', function() { - const CONDITION = this.scrollHeight - this.scrollTop <= this.clientHeight; - if (CONDITION) { + const CONDITION = this.scrollHeight - this.scrollTop <= this.clientHeight; binding.value(); - } }) } } diff --git a/admin-portal/src/views/userManager/components/addDialog.vue b/admin-portal/src/views/userManager/components/addDialog.vue index 06f0bcd8..d77e015a 100644 --- a/admin-portal/src/views/userManager/components/addDialog.vue +++ b/admin-portal/src/views/userManager/components/addDialog.vue @@ -33,7 +33,7 @@ - +