mirror of
https://github.com/beclab/Olares
synced 2026-04-21 13:37:46 +00:00
* feat(connector): add functions to detect Mthreads AI Book and RockChip models * feat(gpu): add MThreads GPU support and related modules * fix(cli): remove redundant import of amdgpu package * chore(cli): remove unnecessary tasks when adding node --------- Co-authored-by: dkeven <dkvvven@gmail.com>
33 lines
774 B
Go
33 lines
774 B
Go
package mtgpu
|
|
|
|
import (
|
|
"github.com/beclab/Olares/cli/pkg/common"
|
|
"github.com/beclab/Olares/cli/pkg/core/task"
|
|
)
|
|
|
|
// InstallMThreadsPluginModule installs MThreads GPU device plugin on Kubernetes.
|
|
type InstallMThreadsPluginModule struct {
|
|
common.KubeModule
|
|
Skip bool // conditional execution based on GPU enablement
|
|
}
|
|
|
|
func (m *InstallMThreadsPluginModule) IsSkip() bool {
|
|
return m.Skip
|
|
}
|
|
|
|
func (m *InstallMThreadsPluginModule) Init() {
|
|
m.Name = "InstallMThreadsPlugin"
|
|
|
|
// update node with MThreads GPU labels
|
|
updateNode := &task.RemoteTask{
|
|
Name: "UpdateNodeMThreadsGPUInfo",
|
|
Hosts: m.Runtime.GetHostsByRole(common.Master),
|
|
Action: new(UpdateNodeMThreadsGPUInfo),
|
|
Parallel: false,
|
|
Retry: 1,
|
|
}
|
|
|
|
m.Tasks = []task.Interface{
|
|
updateNode,
|
|
}
|
|
}
|