Removed libcap related code

libcap is not directly related to Vulkan and should be added by its own PR. It adds additional library dependencies for building and also requires users to run setcap or run ollama as root, which is not ideal for easy use
This commit is contained in:
Masato Nakasaka
2025-08-27 11:51:53 +09:00
parent 834a66689e
commit af5f5bdf60
5 changed files with 34 additions and 134 deletions

View File

@@ -53,7 +53,6 @@ var (
NvmlMgmtName = "" // not currently wired on linux
OneapiMgmtName = "libze_intel_gpu.so*"
VulkanMgmtName = "libvulkan.so*"
libcapMgmtName = "libcap.so*"
)
var VulkanGlobs = []string{
@@ -62,16 +61,6 @@ var VulkanGlobs = []string{
"/usr/lib*/libvulkan.so*",
}
var capLinuxGlobs = []string{
"/usr/lib/x86_64-linux-gnu/libcap.so*",
"/usr/lib/aarch64-linux-gnu/libvulkan.so*",
"/usr/lib*/libcap.so*",
}
func FindLibCapLibs() []string {
return FindGPULibs(libcapMgmtName, capLinuxGlobs)
}
func GetCPUMem() (memInfo, error) {
var mem memInfo
var total, available, free, buffers, cached, freeSwap uint64