chore: add resource worker

This commit is contained in:
jialin
2024-07-21 18:27:22 +08:00
parent 3842006f6e
commit 177ebd1bbe
16 changed files with 280 additions and 40 deletions
+16
View File
@@ -14,3 +14,19 @@ export const status: any = {
[WorkerStatusMap.ready]: StatusMaps.success,
[WorkerStatusMap.not_ready]: StatusMaps.error
};
export const addWorkerGuide = {
mac: {
getToken: 'cat /var/lib/gpustack/token',
registerWorker(server: string) {
return `curl -sfL https://get.gpustack.ai | sh -s - --server-url ${server} --token mytoken`;
}
},
win: {
getToken:
'Get-Content -Path (Join-Path -Path $env:APPDATA -ChildPath "gpustack\\token") -Raw',
registerWorker(server: string) {
return `Invoke-Expression "& { $((Invoke-WebRequest -Uri "https://get.gpustack.ai" -UseBasicParsing).Content) } -ServerURL ${server} -Token mytoken"`;
}
}
};