fix: check driver command for adding worker
This commit is contained in:
@@ -12,7 +12,7 @@ type ViewModalProps = {
|
||||
|
||||
const AddWorkerCommand: React.FC<ViewModalProps> = ({ registrationInfo }) => {
|
||||
const code = React.useMemo(() => {
|
||||
const commandCode = addWorkerGuide['cuda'];
|
||||
const commandCode = addWorkerGuide['all'];
|
||||
return commandCode?.registerWorker({
|
||||
server: registrationInfo.server_url || origin,
|
||||
tag: '',
|
||||
|
||||
@@ -13,9 +13,10 @@ const AddWorkerCommand: React.FC<ViewModalProps> = ({
|
||||
currentGPU
|
||||
}) => {
|
||||
const code = React.useMemo(() => {
|
||||
const command = addWorkerGuide['cuda'];
|
||||
return command.checkEnvCommand[provider || ''];
|
||||
}, [provider]);
|
||||
const configs = addWorkerGuide['all'];
|
||||
const command = configs.checkEnvCommand(currentGPU);
|
||||
return command[provider || ''];
|
||||
}, [provider, currentGPU]);
|
||||
|
||||
return (
|
||||
<HighlightCode
|
||||
|
||||
@@ -26,6 +26,49 @@ interface SupportedHardwareProps {
|
||||
clickable?: boolean;
|
||||
}
|
||||
|
||||
const GPUsConfigs = {
|
||||
cuda: {
|
||||
label: 'NVIDIA',
|
||||
value: 'cuda',
|
||||
runtime: 'nvidia'
|
||||
},
|
||||
rocm: {
|
||||
label: 'AMD',
|
||||
value: 'rocm',
|
||||
runtime: 'rocm'
|
||||
},
|
||||
npu: {
|
||||
label: 'Ascend',
|
||||
value: 'npu',
|
||||
runtime: 'ascend'
|
||||
},
|
||||
dcu: {
|
||||
label: 'Hygon',
|
||||
value: 'dcu',
|
||||
runtime: 'dcu'
|
||||
},
|
||||
musa: {
|
||||
label: 'Moore Threads',
|
||||
value: 'musa',
|
||||
runtime: 'musa'
|
||||
},
|
||||
corex: {
|
||||
label: 'Iluvatar',
|
||||
value: 'corex',
|
||||
runtime: 'corex'
|
||||
},
|
||||
cambricon: {
|
||||
label: 'Cambricon',
|
||||
value: 'cambricon',
|
||||
runtime: 'cambricon'
|
||||
},
|
||||
metax: {
|
||||
label: 'MetaX',
|
||||
value: 'metax',
|
||||
runtime: 'metax'
|
||||
}
|
||||
};
|
||||
|
||||
const SupportedHardware: React.FC<SupportedHardwareProps> = ({
|
||||
onSelect,
|
||||
clickable,
|
||||
|
||||
Reference in New Issue
Block a user