feat: dcu container worker guide

This commit is contained in:
jialin
2025-02-11 10:35:25 +08:00
parent 794f27a3c8
commit 349b895ac5
4 changed files with 22 additions and 6 deletions
@@ -38,7 +38,7 @@ const AddWorker: React.FC<ViewModalProps> = (props) => {
closeIcon={true}
maskClosable={false}
keyboard={false}
width={600}
width={700}
styles={{
body: {
height: 550
@@ -83,6 +83,7 @@ const AddWorker: React.FC<ViewModalProps> = (props) => {
<HighlightCode
code={addWorkerGuide.container.getToken}
theme="dark"
lang="bash"
></HighlightCode>
<h3>
2. {intl.formatMessage({ id: 'resources.worker.add.step2' })}{' '}
@@ -116,7 +117,7 @@ const AddWorker: React.FC<ViewModalProps> = (props) => {
}}
></div>
)}
<HighlightCode theme="dark" code={code}></HighlightCode>
<HighlightCode theme="dark" code={code} lang="sh"></HighlightCode>
<h3 className="m-b-0">
3. {intl.formatMessage({ id: 'resources.worker.add.step3' })}
</h3>
@@ -19,6 +19,10 @@
.code-pre {
white-space: pre-wrap;
}
.ant-radio-button-wrapper {
flex: auto;
}
}
.script-install {
+15 -4
View File
@@ -90,6 +90,16 @@ export const addWorkerGuide: Record<string, any> = {
return `docker run -d --name gpustack-worker --restart=unless-stopped -p 10150:10150 -p 40000-41024:40000-41024 -p 50000-51024:50000-51024 --ipc=host --group-add=video --security-opt seccomp=unconfined --device /dev/kfd --device /dev/dri -v gpustack-worker-data:/var/lib/gpustack gpustack/gpustack:${params.tag} --server-url ${params.server} --token ${params.token} --worker-ip ${params.workerip}`;
}
},
dcu: {
registerWorker(params: {
server: string;
tag: string;
token: string;
workerip: string;
}) {
return `docker run -itd --shm-size 500g --network=host --privileged --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --device=/dev/kfd --device=/dev/dri -v /opt/hyhal:/opt/hyhal:ro gpustack/gpustack:${params.tag} --server-url ${params.server} --token ${params.token} --worker-ip ${params.workerip}`;
}
},
container: {
getToken:
'docker exec -it ${gpustack_container_id} cat /var/lib/gpustack/token'
@@ -97,9 +107,10 @@ export const addWorkerGuide: Record<string, any> = {
};
export const containerInstallOptions = [
{ label: 'CUDA', value: 'cuda' },
{ label: 'AMD', value: 'rocm' },
{ label: 'CANN', value: 'npu' },
{ label: 'MUSA', value: 'musa' },
{ label: 'NVIDIA CUDA', value: 'cuda' },
{ label: 'AMD ROCm', value: 'rocm' },
{ label: 'Ascend CANN', value: 'npu' },
{ label: 'Moore Threads MUSA', value: 'musa' },
{ label: 'Hygon DCU', value: 'dcu' },
{ label: 'CPU', value: 'cpu' }
];