fix: install command is incorrect after switching 310p

This commit is contained in:
jialin
2025-04-18 20:48:24 +08:00
parent c98667245e
commit 50febc342c
@@ -33,21 +33,15 @@ const AddWorker: React.FC<ViewModalProps> = (props) => {
let commandCode = addWorkerGuide[activeKey]; let commandCode = addWorkerGuide[activeKey];
if (npuKey === 'npu310p') { if (npuKey === 'npu310p' && activeKey === 'npu') {
commandCode = addWorkerGuide[npuKey]; commandCode = addWorkerGuide[npuKey];
} }
if (activeKey === 'cuda') { const tag = activeKey === 'cuda' ? version : `${version}-${activeKey}`;
return commandCode?.registerWorker({
server: origin,
tag: version,
token: '${token}',
workerip: '${workerip}'
});
}
return commandCode?.registerWorker({ return commandCode?.registerWorker({
server: origin, server: origin,
tag: `${version}-${activeKey}`, tag: tag,
token: '${token}', token: '${token}',
workerip: '${workerip}' workerip: '${workerip}'
}); });