mirror of
https://github.com/henrygd/beszel.git
synced 2026-03-22 13:36:16 +01:00
purego requires dynamic linking, so split the agent builds: - Default: static binary without NVML (works on musl/alpine) - Glibc: dynamic binary with NVML support via purego Changes: - Add glibc build tag to conditionally include NVML code - Add beszel-agent-linux-amd64-glibc build/archive in goreleaser - Update ghupdate to use glibc binary on glibc systems - Switch nvidia dockerfile to golang:bookworm with -tags glibc
34 lines
606 B
Go
34 lines
606 B
Go
//go:build (!linux && !windows) || !amd64 || (linux && !glibc)
|
|
|
|
package agent
|
|
|
|
import "fmt"
|
|
|
|
type nvmlCollector struct {
|
|
gm *GPUManager
|
|
}
|
|
|
|
func (c *nvmlCollector) init() error {
|
|
return fmt.Errorf("nvml not supported on this platform")
|
|
}
|
|
|
|
func (c *nvmlCollector) start() {}
|
|
|
|
func (c *nvmlCollector) collect() {}
|
|
|
|
func openLibrary(name string) (uintptr, error) {
|
|
return 0, fmt.Errorf("nvml not supported on this platform")
|
|
}
|
|
|
|
func getNVMLPath() string {
|
|
return ""
|
|
}
|
|
|
|
func hasSymbol(lib uintptr, symbol string) bool {
|
|
return false
|
|
}
|
|
|
|
func (c *nvmlCollector) isGPUActive(bdf string) bool {
|
|
return true
|
|
}
|