Move ollama executable out of bin dir (#6535)

This commit is contained in:
Daniel Hiltgen
2024-08-27 16:19:00 -07:00
committed by GitHub
parent d13c3daa0b
commit 93ea9240ae
6 changed files with 21 additions and 10 deletions

View File

@@ -653,7 +653,7 @@ func LibraryDir() string {
slog.Warn("failed to lookup working directory", "error", err)
}
// Scan for any of our dependeices, and pick first match
for _, root := range []string{filepath.Dir(appExe), filepath.Join(filepath.Dir(appExe), ".."), cwd} {
for _, root := range []string{filepath.Dir(appExe), filepath.Join(filepath.Dir(appExe), envconfig.LibRelativeToExe()), cwd} {
libDep := filepath.Join("lib", "ollama")
if _, err := os.Stat(filepath.Join(root, libDep)); err == nil {
return filepath.Join(root, libDep)