From 50febc342ca73bcfad5d1a4a172adb4f6896cc1a Mon Sep 17 00:00:00 2001 From: jialin Date: Fri, 18 Apr 2025 20:46:35 +0800 Subject: [PATCH] fix: install command is incorrect after switching 310p --- .../resources/components/container-install.tsx | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/pages/resources/components/container-install.tsx b/src/pages/resources/components/container-install.tsx index fdc2e2af..2351313a 100644 --- a/src/pages/resources/components/container-install.tsx +++ b/src/pages/resources/components/container-install.tsx @@ -33,21 +33,15 @@ const AddWorker: React.FC = (props) => { let commandCode = addWorkerGuide[activeKey]; - if (npuKey === 'npu310p') { + if (npuKey === 'npu310p' && activeKey === 'npu') { commandCode = addWorkerGuide[npuKey]; } - if (activeKey === 'cuda') { - return commandCode?.registerWorker({ - server: origin, - tag: version, - token: '${token}', - workerip: '${workerip}' - }); - } + const tag = activeKey === 'cuda' ? version : `${version}-${activeKey}`; + return commandCode?.registerWorker({ server: origin, - tag: `${version}-${activeKey}`, + tag: tag, token: '${token}', workerip: '${workerip}' });