Merge pull request #5072 from dhiltgen/windows_path

Move libraries out of users path
This commit is contained in:
Daniel Hiltgen
2024-06-19 09:13:39 -07:00
committed by GitHub
6 changed files with 41 additions and 26 deletions

View File

@@ -274,8 +274,8 @@ func NewLlamaServer(gpus gpu.GpuInfoList, model string, ggml *GGML, adapters, pr
if runtime.GOOS == "windows" {
pathEnv = "PATH"
}
// prepend the server directory to LD_LIBRARY_PATH/PATH
libraryPaths := []string{dir}
// prepend the server directory to LD_LIBRARY_PATH/PATH and the parent dir for common dependencies
libraryPaths := []string{dir, filepath.Dir(dir)}
if libraryPath, ok := os.LookupEnv(pathEnv); ok {
// Append our runner directory to the path