mirror of
https://github.com/mudler/LocalAI.git
synced 2026-02-06 20:54:37 -05:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d65c16e364 | ||
|
|
25f45827ab | ||
|
|
f322f7c62d | ||
|
|
06351cbbb4 |
9
.github/workflows/release.yaml
vendored
9
.github/workflows/release.yaml
vendored
@@ -249,6 +249,11 @@ jobs:
|
||||
build-macOS-arm64:
|
||||
runs-on: macos-14
|
||||
steps:
|
||||
- name: Setup tmate session if tests fail
|
||||
uses: mxschmitt/action-tmate@v3.18
|
||||
with:
|
||||
connect-timeout-seconds: 180
|
||||
limit-access-to-actor: true
|
||||
- name: Clone
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -257,10 +262,6 @@ jobs:
|
||||
with:
|
||||
go-version: '1.21.x'
|
||||
cache: false
|
||||
- name: Setup tmate session if tests fail
|
||||
uses: mxschmitt/action-tmate@v3.18
|
||||
with:
|
||||
limit-access-to-actor: true
|
||||
- name: Dependencies
|
||||
run: |
|
||||
brew install protobuf grpc
|
||||
|
||||
4
Makefile
4
Makefile
@@ -5,7 +5,7 @@ BINARY_NAME=local-ai
|
||||
|
||||
# llama.cpp versions
|
||||
GOLLAMA_STABLE_VERSION?=2b57a8ae43e4699d3dc5d1496a1ccd42922993be
|
||||
CPPLLAMA_VERSION?=963552903f51043ee947a8deeaaa7ec00bc3f1a4
|
||||
CPPLLAMA_VERSION?=172c8256840ffd882ab9992ecedbb587d9b21f15
|
||||
|
||||
# gpt4all version
|
||||
GPT4ALL_REPO?=https://github.com/nomic-ai/gpt4all
|
||||
@@ -16,7 +16,7 @@ RWKV_REPO?=https://github.com/donomii/go-rwkv.cpp
|
||||
RWKV_VERSION?=661e7ae26d442f5cfebd2a0881b44e8c55949ec6
|
||||
|
||||
# whisper.cpp version
|
||||
WHISPER_CPP_VERSION?=420b6abc54008ab634f5887dc45bd77122c2f320
|
||||
WHISPER_CPP_VERSION?=b29b3b29240aac8b71ce8e5a4360c1f1562ad66f
|
||||
|
||||
# bert.cpp version
|
||||
BERT_VERSION?=710044b124545415f555e4260d16b146c725a6e4
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"io/fs"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
func ResolvePath(dir string, paths ...string) string {
|
||||
@@ -55,20 +56,25 @@ func ExtractFiles(content embed.FS, extractDir string) error {
|
||||
// we might use this mechanism to carry over e.g. Nvidia CUDA libraries
|
||||
// from the embedded FS to the target directory
|
||||
|
||||
// Skip this if LOCALAI_SKIP_LD_LIBRARY_PATH is set
|
||||
if os.Getenv("LOCALAI_SKIP_LD_LIBRARY_PATH") != "" {
|
||||
// Skip this if LOCALAI_SKIP_LIBRARY_PATH is set
|
||||
if os.Getenv("LOCALAI_SKIP_LIBRARY_PATH") != "" {
|
||||
return err
|
||||
}
|
||||
|
||||
lpathVar := "LD_LIBRARY_PATH"
|
||||
if runtime.GOOS == "darwin" {
|
||||
lpathVar = "DYLD_FALLBACK_LIBRARY_PATH" // should it be DYLD_LIBRARY_PATH ?
|
||||
}
|
||||
|
||||
for _, libDir := range []string{filepath.Join(extractDir, "backend_assets", "lib"), filepath.Join(extractDir, "lib")} {
|
||||
if _, err := os.Stat(libDir); err == nil {
|
||||
ldLibraryPath := os.Getenv("LD_LIBRARY_PATH")
|
||||
ldLibraryPath := os.Getenv(lpathVar)
|
||||
if ldLibraryPath == "" {
|
||||
ldLibraryPath = libDir
|
||||
} else {
|
||||
ldLibraryPath = fmt.Sprintf("%s:%s", ldLibraryPath, libDir)
|
||||
}
|
||||
os.Setenv("LD_LIBRARY_PATH", ldLibraryPath)
|
||||
os.Setenv(lpathVar, ldLibraryPath)
|
||||
}
|
||||
}
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user