mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-25 21:15:00 +00:00
feat(darwin): embed grpc libs (#2567)
* debug * feat(makefile): allow to bundle libs into binary * ci: bundle protobuf into single-binary Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * ci: tests Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * fix(assets): correctly reference extract folder Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * bundle also abseil Signed-off-by: Ettore Di Giacinto <mudler@localai.io> * bundle more libs Signed-off-by: Ettore Di Giacinto <mudler@localai.io> --------- Signed-off-by: Ettore Di Giacinto <mudler@localai.io> Signed-off-by: Ettore Di Giacinto <mudler@users.noreply.github.com>
This commit is contained in:
parent
25f45827ab
commit
112d0ffa45
3 changed files with 11 additions and 2 deletions
|
@ -61,12 +61,13 @@ func ExtractFiles(content embed.FS, extractDir string) error {
|
|||
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 {
|
||||
ldLibraryPath := os.Getenv(lpathVar)
|
||||
if ldLibraryPath == "" {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue