Compare commits

..

1 Commits

Author SHA1 Message Date
Ettore Di Giacinto
ca65e9ee9b Ci testsg 2024-06-13 23:34:11 +02:00
3 changed files with 10 additions and 17 deletions

View File

@@ -249,11 +249,6 @@ jobs:
build-macOS-arm64: build-macOS-arm64:
runs-on: macos-14 runs-on: macos-14
steps: 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 - name: Clone
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
@@ -262,6 +257,10 @@ jobs:
with: with:
go-version: '1.21.x' go-version: '1.21.x'
cache: false cache: false
- name: Setup tmate session if tests fail
uses: mxschmitt/action-tmate@v3.18
with:
limit-access-to-actor: true
- name: Dependencies - name: Dependencies
run: | run: |
brew install protobuf grpc brew install protobuf grpc

View File

@@ -5,7 +5,7 @@ BINARY_NAME=local-ai
# llama.cpp versions # llama.cpp versions
GOLLAMA_STABLE_VERSION?=2b57a8ae43e4699d3dc5d1496a1ccd42922993be GOLLAMA_STABLE_VERSION?=2b57a8ae43e4699d3dc5d1496a1ccd42922993be
CPPLLAMA_VERSION?=172c8256840ffd882ab9992ecedbb587d9b21f15 CPPLLAMA_VERSION?=963552903f51043ee947a8deeaaa7ec00bc3f1a4
# gpt4all version # gpt4all version
GPT4ALL_REPO?=https://github.com/nomic-ai/gpt4all GPT4ALL_REPO?=https://github.com/nomic-ai/gpt4all
@@ -16,7 +16,7 @@ RWKV_REPO?=https://github.com/donomii/go-rwkv.cpp
RWKV_VERSION?=661e7ae26d442f5cfebd2a0881b44e8c55949ec6 RWKV_VERSION?=661e7ae26d442f5cfebd2a0881b44e8c55949ec6
# whisper.cpp version # whisper.cpp version
WHISPER_CPP_VERSION?=b29b3b29240aac8b71ce8e5a4360c1f1562ad66f WHISPER_CPP_VERSION?=420b6abc54008ab634f5887dc45bd77122c2f320
# bert.cpp version # bert.cpp version
BERT_VERSION?=710044b124545415f555e4260d16b146c725a6e4 BERT_VERSION?=710044b124545415f555e4260d16b146c725a6e4

View File

@@ -6,7 +6,6 @@ import (
"io/fs" "io/fs"
"os" "os"
"path/filepath" "path/filepath"
"runtime"
) )
func ResolvePath(dir string, paths ...string) string { func ResolvePath(dir string, paths ...string) string {
@@ -56,25 +55,20 @@ func ExtractFiles(content embed.FS, extractDir string) error {
// we might use this mechanism to carry over e.g. Nvidia CUDA libraries // we might use this mechanism to carry over e.g. Nvidia CUDA libraries
// from the embedded FS to the target directory // from the embedded FS to the target directory
// Skip this if LOCALAI_SKIP_LIBRARY_PATH is set // Skip this if LOCALAI_SKIP_LD_LIBRARY_PATH is set
if os.Getenv("LOCALAI_SKIP_LIBRARY_PATH") != "" { if os.Getenv("LOCALAI_SKIP_LD_LIBRARY_PATH") != "" {
return err 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")} { for _, libDir := range []string{filepath.Join(extractDir, "backend_assets", "lib"), filepath.Join(extractDir, "lib")} {
if _, err := os.Stat(libDir); err == nil { if _, err := os.Stat(libDir); err == nil {
ldLibraryPath := os.Getenv(lpathVar) ldLibraryPath := os.Getenv("LD_LIBRARY_PATH")
if ldLibraryPath == "" { if ldLibraryPath == "" {
ldLibraryPath = libDir ldLibraryPath = libDir
} else { } else {
ldLibraryPath = fmt.Sprintf("%s:%s", ldLibraryPath, libDir) ldLibraryPath = fmt.Sprintf("%s:%s", ldLibraryPath, libDir)
} }
os.Setenv(lpathVar, ldLibraryPath) os.Setenv("LD_LIBRARY_PATH", ldLibraryPath)
} }
} }
return err return err