Compare commits

..

3 Commits

Author SHA1 Message Date
Ettore Di Giacinto
40daa857c7 fix(trl): guard uv-only --index-strategy for the pip/darwin path
The darwin/MPS build installs with pip (USE_PIP=true), which rejects the
uv-only --index-strategy flag and failed the darwin backend build. Add it
only on the uv path; Linux/CUDA resolution is unchanged.

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Assisted-by: Claude:opus-4.8 [Claude Code]
2026-06-24 19:55:32 +00:00
Ettore Di Giacinto
c0efc28968 feat(backends): add darwin/metal (MPS) build for trl
Authors backend/python/trl/requirements-mps.txt and wires trl into the
darwin CI matrix and gallery so the MPS training path can be built and
validated on Apple Silicon. The MPS variant installs plain PyPI torch
wheels (MPS-capable on macOS arm64) and the trl training stack; bitsandbytes
is omitted as it is a CUDA-only dependency with poor Apple Silicon support.

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Assisted-by: Claude:opus-4.8 [Claude Code]
2026-06-24 17:11:34 +00:00
Dedy F. Setyawan
e8ae88a2a0 i18n(id): update and complete Indonesian translations (#10480)
- translate remaining English strings in chat, common, home, and media locales.
- fix typo and improve wording consistency (e.g., klaster -> kluster, otomasi -> automasi).

Signed-off-by: Dedy F. Setyawan <dedyfajars@gmail.com>
2026-06-24 18:35:21 +02:00
68 changed files with 168 additions and 402 deletions

View File

@@ -4974,6 +4974,9 @@ includeDarwin:
- backend: "kitten-tts" - backend: "kitten-tts"
tag-suffix: "-metal-darwin-arm64-kitten-tts" tag-suffix: "-metal-darwin-arm64-kitten-tts"
build-type: "mps" build-type: "mps"
- backend: "trl"
tag-suffix: "-metal-darwin-arm64-trl"
build-type: "mps"
- backend: "piper" - backend: "piper"
tag-suffix: "-metal-darwin-arm64-piper" tag-suffix: "-metal-darwin-arm64-piper"
build-type: "metal" build-type: "metal"

View File

@@ -117,8 +117,7 @@ libgoacestepcpp-custom: CMakeLists.txt cpp/goacestepcpp.cpp cpp/goacestepcpp.h
cmake .. $(CMAKE_ARGS) && \ cmake .. $(CMAKE_ARGS) && \
cmake --build . --config Release -j$(JOBS) --target goacestepcpp && \ cmake --build . --config Release -j$(JOBS) --target goacestepcpp && \
cd .. && \ cd .. && \
(mv build-$(SO_TARGET)/libgoacestepcpp.so ./$(SO_TARGET) 2>/dev/null || \ mv build-$(SO_TARGET)/libgoacestepcpp.so ./$(SO_TARGET)
mv build-$(SO_TARGET)/libgoacestepcpp.dylib ./$(SO_TARGET) 2>/dev/null)
test: acestep-cpp test: acestep-cpp
@echo "Running acestep-cpp tests..." @echo "Running acestep-cpp tests..."

View File

@@ -4,7 +4,6 @@ package main
import ( import (
"flag" "flag"
"os" "os"
"runtime"
"github.com/ebitengine/purego" "github.com/ebitengine/purego"
grpc "github.com/mudler/LocalAI/pkg/grpc" grpc "github.com/mudler/LocalAI/pkg/grpc"
@@ -23,11 +22,7 @@ func main() {
// Get library name from environment variable, default to fallback // Get library name from environment variable, default to fallback
libName := os.Getenv("ACESTEP_LIBRARY") libName := os.Getenv("ACESTEP_LIBRARY")
if libName == "" { if libName == "" {
if runtime.GOOS == "darwin" { libName = "./libgoacestepcpp-fallback.so"
libName = "./libgoacestepcpp-fallback.dylib"
} else {
libName = "./libgoacestepcpp-fallback.so"
}
} }
gosd, err := purego.Dlopen(libName, purego.RTLD_NOW|purego.RTLD_GLOBAL) gosd, err := purego.Dlopen(libName, purego.RTLD_NOW|purego.RTLD_GLOBAL)

View File

@@ -13,7 +13,6 @@ mkdir -p $CURDIR/package/lib
cp -avf $CURDIR/acestep-cpp $CURDIR/package/ cp -avf $CURDIR/acestep-cpp $CURDIR/package/
cp -fv $CURDIR/libgoacestepcpp-*.so $CURDIR/package/ cp -fv $CURDIR/libgoacestepcpp-*.so $CURDIR/package/
cp -fv $CURDIR/libgoacestepcpp-*.dylib $CURDIR/package/ 2>/dev/null || true
cp -fv $CURDIR/run.sh $CURDIR/package/ cp -fv $CURDIR/run.sh $CURDIR/package/
# Detect architecture and copy appropriate libraries # Detect architecture and copy appropriate libraries

View File

@@ -12,19 +12,9 @@ if [ "$(uname)" != "Darwin" ]; then
grep -e "flags" /proc/cpuinfo | head -1 grep -e "flags" /proc/cpuinfo | head -1
fi fi
if [ "$(uname)" = "Darwin" ]; then LIBRARY="$CURDIR/libgoacestepcpp-fallback.so"
# macOS: single library variant (Metal or Accelerate). The goacestepcpp
# target is built as a CMake MODULE, which emits a .dylib for a SHARED
# build but a .so for a MODULE build on Apple, so prefer .dylib and fall
# back to .so.
LIBRARY="$CURDIR/libgoacestepcpp-fallback.dylib"
if [ ! -e "$LIBRARY" ]; then
LIBRARY="$CURDIR/libgoacestepcpp-fallback.so"
fi
export DYLD_LIBRARY_PATH=$CURDIR/lib:$DYLD_LIBRARY_PATH
else
LIBRARY="$CURDIR/libgoacestepcpp-fallback.so"
if [ "$(uname)" != "Darwin" ]; then
if grep -q -e "\savx\s" /proc/cpuinfo ; then if grep -q -e "\savx\s" /proc/cpuinfo ; then
echo "CPU: AVX found OK" echo "CPU: AVX found OK"
if [ -e $CURDIR/libgoacestepcpp-avx.so ]; then if [ -e $CURDIR/libgoacestepcpp-avx.so ]; then
@@ -46,10 +36,9 @@ else
LIBRARY="$CURDIR/libgoacestepcpp-avx512.so" LIBRARY="$CURDIR/libgoacestepcpp-avx512.so"
fi fi
fi fi
export LD_LIBRARY_PATH=$CURDIR/lib:$LD_LIBRARY_PATH
fi fi
export LD_LIBRARY_PATH=$CURDIR/lib:$LD_LIBRARY_PATH
export ACESTEP_LIBRARY=$LIBRARY export ACESTEP_LIBRARY=$LIBRARY
# If there is a lib/ld.so, use it # If there is a lib/ld.so, use it

View File

@@ -57,7 +57,6 @@ libced.so: sources/ced.cpp
cmake -B sources/ced.cpp/build-shared -S sources/ced.cpp $(CMAKE_ARGS) cmake -B sources/ced.cpp/build-shared -S sources/ced.cpp $(CMAKE_ARGS)
cmake --build sources/ced.cpp/build-shared --config Release -j$(JOBS) cmake --build sources/ced.cpp/build-shared --config Release -j$(JOBS)
cp -fv sources/ced.cpp/build-shared/libced.so* ./ 2>/dev/null || true cp -fv sources/ced.cpp/build-shared/libced.so* ./ 2>/dev/null || true
cp -fv sources/ced.cpp/build-shared/libced.dylib ./ 2>/dev/null || true
cp -fv sources/ced.cpp/include/ced_capi.h ./ cp -fv sources/ced.cpp/include/ced_capi.h ./
ced-grpc: libced.so main.go goced.go ced-grpc: libced.so main.go goced.go

View File

@@ -12,7 +12,6 @@ import (
"flag" "flag"
"fmt" "fmt"
"os" "os"
"runtime"
"github.com/ebitengine/purego" "github.com/ebitengine/purego"
grpc "github.com/mudler/LocalAI/pkg/grpc" grpc "github.com/mudler/LocalAI/pkg/grpc"
@@ -28,11 +27,7 @@ type libFunc struct {
func main() { func main() {
libName := os.Getenv("CED_LIBRARY") libName := os.Getenv("CED_LIBRARY")
if libName == "" { if libName == "" {
if runtime.GOOS == "darwin" { libName = "libced.so"
libName = "libced.dylib"
} else {
libName = "libced.so"
}
} }
lib, err := purego.Dlopen(libName, purego.RTLD_NOW|purego.RTLD_GLOBAL) lib, err := purego.Dlopen(libName, purego.RTLD_NOW|purego.RTLD_GLOBAL)
if err != nil { if err != nil {

View File

@@ -15,12 +15,10 @@ mkdir -p "$CURDIR/package/lib"
cp -avf "$CURDIR/ced-grpc" "$CURDIR/package/" cp -avf "$CURDIR/ced-grpc" "$CURDIR/package/"
cp -avf "$CURDIR/run.sh" "$CURDIR/package/" cp -avf "$CURDIR/run.sh" "$CURDIR/package/"
cp -avf "$CURDIR"/libced.so* "$CURDIR/package/lib/" 2>/dev/null || true cp -avf "$CURDIR"/libced.so* "$CURDIR/package/lib/" 2>/dev/null || {
cp -avf "$CURDIR"/libced.dylib "$CURDIR/package/lib/" 2>/dev/null || true echo "ERROR: libced.so not found in $CURDIR, run 'make' first" >&2
if ! ls "$CURDIR"/package/lib/libced.* >/dev/null 2>&1; then
echo "ERROR: libced shared library not found in $CURDIR, run 'make' first" >&2
exit 1 exit 1
fi }
if [ -f "/lib64/ld-linux-x86-64.so.2" ]; then if [ -f "/lib64/ld-linux-x86-64.so.2" ]; then
echo "Detected x86_64 architecture, copying x86_64 libraries..." echo "Detected x86_64 architecture, copying x86_64 libraries..."

View File

@@ -3,12 +3,7 @@ set -e
CURDIR=$(dirname "$(realpath "$0")") CURDIR=$(dirname "$(realpath "$0")")
if [ "$(uname)" = "Darwin" ]; then export LD_LIBRARY_PATH="$CURDIR/lib:$CURDIR:${LD_LIBRARY_PATH:-}"
export DYLD_LIBRARY_PATH="$CURDIR/lib:$CURDIR:${DYLD_LIBRARY_PATH:-}"
export CED_LIBRARY="$CURDIR/lib/libced.dylib"
else
export LD_LIBRARY_PATH="$CURDIR/lib:$CURDIR:${LD_LIBRARY_PATH:-}"
fi
# If a self-contained ld.so was packaged, route through it so the packaged # If a self-contained ld.so was packaged, route through it so the packaged
# libc / libstdc++ are used instead of the host's (matches the sibling backends). # libc / libstdc++ are used instead of the host's (matches the sibling backends).

View File

@@ -75,8 +75,7 @@ UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux) ifeq ($(UNAME_S),Linux)
VARIANT_TARGETS = libgocrispasr-avx.so libgocrispasr-avx2.so libgocrispasr-avx512.so libgocrispasr-fallback.so VARIANT_TARGETS = libgocrispasr-avx.so libgocrispasr-avx2.so libgocrispasr-avx512.so libgocrispasr-fallback.so
else else
# On non-Linux (e.g., Darwin), build only fallback variant (as a dylib) VARIANT_TARGETS = libgocrispasr-fallback.so
VARIANT_TARGETS = libgocrispasr-fallback.dylib
endif endif
crispasr: main.go gocrispasr.go $(VARIANT_TARGETS) crispasr: main.go gocrispasr.go $(VARIANT_TARGETS)
@@ -88,7 +87,7 @@ package: crispasr
build: package build: package
clean: purge clean: purge
rm -rf libgocrispasr*.so libgocrispasr*.dylib package sources/CrispASR crispasr rm -rf libgocrispasr*.so package sources/CrispASR crispasr
purge: purge:
rm -rf build* rm -rf build*
@@ -119,21 +118,13 @@ libgocrispasr-fallback.so: sources/CrispASR
SO_TARGET=libgocrispasr-fallback.so CMAKE_ARGS="$(CMAKE_ARGS) -DGGML_AVX=off -DGGML_AVX2=off -DGGML_AVX512=off -DGGML_FMA=off -DGGML_F16C=off -DGGML_BMI2=off" $(MAKE) libgocrispasr-custom SO_TARGET=libgocrispasr-fallback.so CMAKE_ARGS="$(CMAKE_ARGS) -DGGML_AVX=off -DGGML_AVX2=off -DGGML_AVX512=off -DGGML_FMA=off -DGGML_F16C=off -DGGML_BMI2=off" $(MAKE) libgocrispasr-custom
rm -rfv build* rm -rfv build*
# Build fallback variant as a dylib (Darwin)
libgocrispasr-fallback.dylib: sources/CrispASR
$(MAKE) purge
$(info ${GREEN}I crispasr build info:fallback (dylib)${RESET})
SO_TARGET=libgocrispasr-fallback.dylib CMAKE_ARGS="$(CMAKE_ARGS) -DGGML_AVX=off -DGGML_AVX2=off -DGGML_AVX512=off -DGGML_FMA=off -DGGML_F16C=off -DGGML_BMI2=off" $(MAKE) libgocrispasr-custom
rm -rfv build*
libgocrispasr-custom: CMakeLists.txt cpp/crispasr_shim.cpp cpp/crispasr_shim.h libgocrispasr-custom: CMakeLists.txt cpp/crispasr_shim.cpp cpp/crispasr_shim.h
mkdir -p build-$(SO_TARGET) && \ mkdir -p build-$(SO_TARGET) && \
cd build-$(SO_TARGET) && \ cd build-$(SO_TARGET) && \
cmake .. $(CMAKE_ARGS) && \ cmake .. $(CMAKE_ARGS) && \
cmake --build . --config Release -j$(JOBS) && \ cmake --build . --config Release -j$(JOBS) && \
cd .. && \ cd .. && \
(mv build-$(SO_TARGET)/libgocrispasr.so ./$(SO_TARGET) 2>/dev/null || \ mv build-$(SO_TARGET)/libgocrispasr.so ./$(SO_TARGET)
mv build-$(SO_TARGET)/libgocrispasr.dylib ./$(SO_TARGET) 2>/dev/null)
test: crispasr test: crispasr
CGO_ENABLED=0 $(GOCMD) test -v ./... CGO_ENABLED=0 $(GOCMD) test -v ./...

View File

@@ -4,7 +4,6 @@ package main
import ( import (
"flag" "flag"
"os" "os"
"runtime"
"github.com/ebitengine/purego" "github.com/ebitengine/purego"
grpc "github.com/mudler/LocalAI/pkg/grpc" grpc "github.com/mudler/LocalAI/pkg/grpc"
@@ -22,11 +21,7 @@ type LibFuncs struct {
func main() { func main() {
libName := os.Getenv("CRISPASR_LIBRARY") libName := os.Getenv("CRISPASR_LIBRARY")
if libName == "" { if libName == "" {
if runtime.GOOS == "darwin" { libName = "./libgocrispasr-fallback.so"
libName = "./libgocrispasr-fallback.dylib"
} else {
libName = "./libgocrispasr-fallback.so"
}
} }
lib, err := purego.Dlopen(libName, purego.RTLD_NOW|purego.RTLD_GLOBAL) lib, err := purego.Dlopen(libName, purego.RTLD_NOW|purego.RTLD_GLOBAL)

View File

@@ -12,8 +12,7 @@ REPO_ROOT="${CURDIR}/../../.."
mkdir -p $CURDIR/package/lib mkdir -p $CURDIR/package/lib
cp -avf $CURDIR/crispasr $CURDIR/package/ cp -avf $CURDIR/crispasr $CURDIR/package/
cp -fv $CURDIR/libgocrispasr-*.so $CURDIR/package/ 2>/dev/null || true cp -fv $CURDIR/libgocrispasr-*.so $CURDIR/package/
cp -fv $CURDIR/libgocrispasr-*.dylib $CURDIR/package/ 2>/dev/null || true
cp -fv $CURDIR/run.sh $CURDIR/package/ cp -fv $CURDIR/run.sh $CURDIR/package/
# Detect architecture and copy appropriate libraries # Detect architecture and copy appropriate libraries

View File

@@ -12,13 +12,9 @@ if [ "$(uname)" != "Darwin" ]; then
grep -e "flags" /proc/cpuinfo | head -1 grep -e "flags" /proc/cpuinfo | head -1
fi fi
if [ "$(uname)" = "Darwin" ]; then LIBRARY="$CURDIR/libgocrispasr-fallback.so"
# macOS: single dylib variant (Metal or Accelerate)
LIBRARY="$CURDIR/libgocrispasr-fallback.dylib"
export DYLD_LIBRARY_PATH=$CURDIR/lib:$DYLD_LIBRARY_PATH
else
LIBRARY="$CURDIR/libgocrispasr-fallback.so"
if [ "$(uname)" != "Darwin" ]; then
if grep -q -e "\savx\s" /proc/cpuinfo ; then if grep -q -e "\savx\s" /proc/cpuinfo ; then
echo "CPU: AVX found OK" echo "CPU: AVX found OK"
if [ -e $CURDIR/libgocrispasr-avx.so ]; then if [ -e $CURDIR/libgocrispasr-avx.so ]; then
@@ -40,10 +36,9 @@ else
LIBRARY="$CURDIR/libgocrispasr-avx512.so" LIBRARY="$CURDIR/libgocrispasr-avx512.so"
fi fi
fi fi
export LD_LIBRARY_PATH=$CURDIR/lib:$LD_LIBRARY_PATH
fi fi
export LD_LIBRARY_PATH=$CURDIR/lib:$LD_LIBRARY_PATH
export CRISPASR_LIBRARY=$LIBRARY export CRISPASR_LIBRARY=$LIBRARY
# Point piper's espeak-ng phonemizer at the bundled voice data. The variable # Point piper's espeak-ng phonemizer at the bundled voice data. The variable

View File

@@ -77,7 +77,7 @@ ifeq ($(UNAME_S),Linux)
VARIANT_TARGETS = libdepthanythingcpp-avx.so libdepthanythingcpp-avx2.so libdepthanythingcpp-avx512.so libdepthanythingcpp-fallback.so VARIANT_TARGETS = libdepthanythingcpp-avx.so libdepthanythingcpp-avx2.so libdepthanythingcpp-avx512.so libdepthanythingcpp-fallback.so
else else
# On non-Linux (e.g., Darwin), build only fallback variant # On non-Linux (e.g., Darwin), build only fallback variant
VARIANT_TARGETS = libdepthanythingcpp-fallback.dylib VARIANT_TARGETS = libdepthanythingcpp-fallback.so
endif endif
depth-anything-cpp: main.go godepthanythingcpp.go $(VARIANT_TARGETS) depth-anything-cpp: main.go godepthanythingcpp.go $(VARIANT_TARGETS)
@@ -89,7 +89,7 @@ package: depth-anything-cpp
build: package build: package
clean: purge clean: purge
rm -rf libdepthanythingcpp*.so libdepthanythingcpp*.dylib depth-anything-cpp package sources rm -rf libdepthanythingcpp*.so depth-anything-cpp package sources
purge: purge:
rm -rf build* rm -rf build*
@@ -116,19 +116,11 @@ libdepthanythingcpp-avx512.so: sources/depth-anything.cpp
endif endif
# Build fallback variant (all platforms) # Build fallback variant (all platforms)
ifeq ($(UNAME_S),Darwin)
libdepthanythingcpp-fallback.dylib: sources/depth-anything.cpp
rm -rfv build-$@
$(info ${GREEN}I depth-anything-cpp build info:fallback${RESET})
SO_TARGET=$@ CMAKE_ARGS="$(CMAKE_ARGS) -DGGML_AVX=off -DGGML_AVX2=off -DGGML_AVX512=off -DGGML_FMA=off -DGGML_F16C=off -DGGML_BMI2=off" $(MAKE) libdepthanythingcpp-custom
rm -rfv build-$@
else
libdepthanythingcpp-fallback.so: sources/depth-anything.cpp libdepthanythingcpp-fallback.so: sources/depth-anything.cpp
rm -rfv build-$@ rm -rfv build-$@
$(info ${GREEN}I depth-anything-cpp build info:fallback${RESET}) $(info ${GREEN}I depth-anything-cpp build info:fallback${RESET})
SO_TARGET=$@ CMAKE_ARGS="$(CMAKE_ARGS) -DGGML_AVX=off -DGGML_AVX2=off -DGGML_AVX512=off -DGGML_FMA=off -DGGML_F16C=off -DGGML_BMI2=off" $(MAKE) libdepthanythingcpp-custom SO_TARGET=$@ CMAKE_ARGS="$(CMAKE_ARGS) -DGGML_AVX=off -DGGML_AVX2=off -DGGML_AVX512=off -DGGML_FMA=off -DGGML_F16C=off -DGGML_BMI2=off" $(MAKE) libdepthanythingcpp-custom
rm -rfv build-$@ rm -rfv build-$@
endif
libdepthanythingcpp-custom: CMakeLists.txt libdepthanythingcpp-custom: CMakeLists.txt
mkdir -p build-$(SO_TARGET) && \ mkdir -p build-$(SO_TARGET) && \
@@ -136,8 +128,7 @@ libdepthanythingcpp-custom: CMakeLists.txt
cmake .. $(CMAKE_ARGS) && \ cmake .. $(CMAKE_ARGS) && \
cmake --build . --config Release -j$(JOBS) && \ cmake --build . --config Release -j$(JOBS) && \
cd .. && \ cd .. && \
(mv build-$(SO_TARGET)/libdepthanything.so ./$(SO_TARGET) 2>/dev/null || \ mv build-$(SO_TARGET)/libdepthanything.so ./$(SO_TARGET)
mv build-$(SO_TARGET)/libdepthanything.dylib ./$(SO_TARGET) 2>/dev/null)
all: depth-anything-cpp package all: depth-anything-cpp package

View File

@@ -9,7 +9,6 @@ package main
import ( import (
"flag" "flag"
"os" "os"
"runtime"
"github.com/ebitengine/purego" "github.com/ebitengine/purego"
grpc "github.com/mudler/LocalAI/pkg/grpc" grpc "github.com/mudler/LocalAI/pkg/grpc"
@@ -28,11 +27,7 @@ func main() {
// Get library name from environment variable, default to fallback // Get library name from environment variable, default to fallback
libName := os.Getenv("DEPTHANYTHING_LIBRARY") libName := os.Getenv("DEPTHANYTHING_LIBRARY")
if libName == "" { if libName == "" {
if runtime.GOOS == "darwin" { libName = "./libdepthanythingcpp-fallback.so"
libName = "./libdepthanythingcpp-fallback.dylib"
} else {
libName = "./libdepthanythingcpp-fallback.so"
}
} }
lib, err := purego.Dlopen(libName, purego.RTLD_NOW|purego.RTLD_GLOBAL) lib, err := purego.Dlopen(libName, purego.RTLD_NOW|purego.RTLD_GLOBAL)

View File

@@ -10,8 +10,7 @@ REPO_ROOT="${CURDIR}/../../.."
# Create lib directory # Create lib directory
mkdir -p $CURDIR/package/lib mkdir -p $CURDIR/package/lib
cp -fv $CURDIR/libdepthanythingcpp-*.so $CURDIR/package/ 2>/dev/null || true cp -avf $CURDIR/libdepthanythingcpp-*.so $CURDIR/package/
cp -fv $CURDIR/libdepthanythingcpp-*.dylib $CURDIR/package/ 2>/dev/null || true
cp -avf $CURDIR/depth-anything-cpp $CURDIR/package/ cp -avf $CURDIR/depth-anything-cpp $CURDIR/package/
cp -fv $CURDIR/run.sh $CURDIR/package/ cp -fv $CURDIR/run.sh $CURDIR/package/

View File

@@ -12,13 +12,9 @@ if [ "$(uname)" != "Darwin" ]; then
grep -e "flags" /proc/cpuinfo | head -1 grep -e "flags" /proc/cpuinfo | head -1
fi fi
if [ "$(uname)" = "Darwin" ]; then LIBRARY="$CURDIR/libdepthanythingcpp-fallback.so"
# macOS: single dylib variant (Metal or Accelerate)
LIBRARY="$CURDIR/libdepthanythingcpp-fallback.dylib"
export DYLD_LIBRARY_PATH=$CURDIR/lib:$DYLD_LIBRARY_PATH
else
LIBRARY="$CURDIR/libdepthanythingcpp-fallback.so"
if [ "$(uname)" != "Darwin" ]; then
if grep -q -e "\savx\s" /proc/cpuinfo ; then if grep -q -e "\savx\s" /proc/cpuinfo ; then
echo "CPU: AVX found OK" echo "CPU: AVX found OK"
if [ -e $CURDIR/libdepthanythingcpp-avx.so ]; then if [ -e $CURDIR/libdepthanythingcpp-avx.so ]; then
@@ -40,10 +36,9 @@ else
LIBRARY="$CURDIR/libdepthanythingcpp-avx512.so" LIBRARY="$CURDIR/libdepthanythingcpp-avx512.so"
fi fi
fi fi
export LD_LIBRARY_PATH=$CURDIR/lib:$LD_LIBRARY_PATH
fi fi
export LD_LIBRARY_PATH=$CURDIR/lib:$LD_LIBRARY_PATH
export DEPTHANYTHING_LIBRARY=$LIBRARY export DEPTHANYTHING_LIBRARY=$LIBRARY
# If there is a lib/ld.so, use it # If there is a lib/ld.so, use it

View File

@@ -67,9 +67,8 @@ $(LIB_SENTINEL): sources/LocalVQE
# that the loader picks at runtime. We must build every target — the # that the loader picks at runtime. We must build every target — the
# default `--target localvqe_shared` drops these. CMAKE_LIBRARY_OUTPUT_DIRECTORY # default `--target localvqe_shared` drops these. CMAKE_LIBRARY_OUTPUT_DIRECTORY
# routes all of them into build/bin; copy them out next to the binary. # routes all of them into build/bin; copy them out next to the binary.
cp -P build/bin/liblocalvqe.so* . 2>/dev/null || cp -P build/bin/liblocalvqe.dylib . 2>/dev/null || cp -P build/liblocalvqe.so* . 2>/dev/null || cp -P build/liblocalvqe.dylib . cp -P build/bin/liblocalvqe.so* . 2>/dev/null || cp -P build/liblocalvqe.so* .
cp -P build/bin/libggml*.so* . 2>/dev/null || true cp -P build/bin/libggml*.so* . 2>/dev/null || true
cp -P build/bin/libggml*.dylib . 2>/dev/null || true
touch $(LIB_SENTINEL) touch $(LIB_SENTINEL)
liblocalvqe.so: $(LIB_SENTINEL) liblocalvqe.so: $(LIB_SENTINEL)

View File

@@ -4,7 +4,6 @@ package main
import ( import (
"flag" "flag"
"os" "os"
"runtime"
"github.com/ebitengine/purego" "github.com/ebitengine/purego"
grpc "github.com/mudler/LocalAI/pkg/grpc" grpc "github.com/mudler/LocalAI/pkg/grpc"
@@ -22,11 +21,7 @@ type LibFuncs struct {
func main() { func main() {
libName := os.Getenv("LOCALVQE_LIBRARY") libName := os.Getenv("LOCALVQE_LIBRARY")
if libName == "" { if libName == "" {
if runtime.GOOS == "darwin" { libName = "./liblocalvqe.so"
libName = "./liblocalvqe.dylib"
} else {
libName = "./liblocalvqe.so"
}
} }
lib, err := purego.Dlopen(libName, purego.RTLD_NOW|purego.RTLD_GLOBAL) lib, err := purego.Dlopen(libName, purego.RTLD_NOW|purego.RTLD_GLOBAL)

View File

@@ -15,9 +15,7 @@ cp -avf $CURDIR/localvqe $CURDIR/package/
# liblocalvqe.so* (with SOVERSION symlinks) and the libggml-*.so runtime # liblocalvqe.so* (with SOVERSION symlinks) and the libggml-*.so runtime
# variants — LocalVQE picks the matching CPU variant at load time. # variants — LocalVQE picks the matching CPU variant at load time.
cp -P $CURDIR/liblocalvqe.so* $CURDIR/package/ 2>/dev/null || true cp -P $CURDIR/liblocalvqe.so* $CURDIR/package/ 2>/dev/null || true
cp -P $CURDIR/liblocalvqe.dylib $CURDIR/package/ 2>/dev/null || true
cp -P $CURDIR/libggml*.so* $CURDIR/package/ 2>/dev/null || true cp -P $CURDIR/libggml*.so* $CURDIR/package/ 2>/dev/null || true
cp -P $CURDIR/libggml*.dylib $CURDIR/package/ 2>/dev/null || true
cp -fv $CURDIR/run.sh $CURDIR/package/ cp -fv $CURDIR/run.sh $CURDIR/package/
# Detect architecture and copy appropriate libraries # Detect architecture and copy appropriate libraries

View File

@@ -10,19 +10,8 @@ CURDIR=$(dirname "$(realpath $0)")
# exec'ing the binary. # exec'ing the binary.
cd "$CURDIR" cd "$CURDIR"
if [ "$(uname)" = "Darwin" ]; then export LD_LIBRARY_PATH=$CURDIR:$CURDIR/lib:$LD_LIBRARY_PATH
# macOS: LocalVQE is built as a SHARED library, so dyld needs the .dylib + export LOCALVQE_LIBRARY=$CURDIR/liblocalvqe.so
# DYLD_LIBRARY_PATH. Prefer .dylib and fall back to .so just in case.
export DYLD_LIBRARY_PATH=$CURDIR:$CURDIR/lib:$DYLD_LIBRARY_PATH
LOCALVQE_LIBRARY=$CURDIR/liblocalvqe.dylib
if [ ! -e "$LOCALVQE_LIBRARY" ]; then
LOCALVQE_LIBRARY=$CURDIR/liblocalvqe.so
fi
export LOCALVQE_LIBRARY
else
export LD_LIBRARY_PATH=$CURDIR:$CURDIR/lib:$LD_LIBRARY_PATH
export LOCALVQE_LIBRARY=$CURDIR/liblocalvqe.so
fi
if [ -f $CURDIR/lib/ld.so ]; then if [ -f $CURDIR/lib/ld.so ]; then
echo "Using lib/ld.so" echo "Using lib/ld.so"

View File

@@ -70,7 +70,7 @@ ifeq ($(UNAME_S),Linux)
VARIANT_TARGETS = liblocateanythingcpp-avx.so liblocateanythingcpp-avx2.so liblocateanythingcpp-avx512.so liblocateanythingcpp-fallback.so VARIANT_TARGETS = liblocateanythingcpp-avx.so liblocateanythingcpp-avx2.so liblocateanythingcpp-avx512.so liblocateanythingcpp-fallback.so
else else
# On non-Linux (e.g., Darwin), build only fallback variant # On non-Linux (e.g., Darwin), build only fallback variant
VARIANT_TARGETS = liblocateanythingcpp-fallback.dylib VARIANT_TARGETS = liblocateanythingcpp-fallback.so
endif endif
locate-anything-cpp: main.go golocateanythingcpp.go $(VARIANT_TARGETS) locate-anything-cpp: main.go golocateanythingcpp.go $(VARIANT_TARGETS)
@@ -82,7 +82,7 @@ package: locate-anything-cpp
build: package build: package
clean: purge clean: purge
rm -rf liblocateanythingcpp*.so liblocateanythingcpp*.dylib locate-anything-cpp package sources rm -rf liblocateanythingcpp*.so locate-anything-cpp package sources
purge: purge:
rm -rf build* rm -rf build*
@@ -109,19 +109,11 @@ liblocateanythingcpp-avx512.so: sources/locate-anything.cpp
endif endif
# Build fallback variant (all platforms) # Build fallback variant (all platforms)
ifeq ($(UNAME_S),Darwin)
liblocateanythingcpp-fallback.dylib: sources/locate-anything.cpp
rm -rfv build-$@
$(info ${GREEN}I locate-anything-cpp build info:fallback${RESET})
SO_TARGET=$@ CMAKE_ARGS="$(CMAKE_ARGS) -DGGML_AVX=off -DGGML_AVX2=off -DGGML_AVX512=off -DGGML_FMA=off -DGGML_F16C=off -DGGML_BMI2=off" $(MAKE) liblocateanythingcpp-custom
rm -rfv build-$@
else
liblocateanythingcpp-fallback.so: sources/locate-anything.cpp liblocateanythingcpp-fallback.so: sources/locate-anything.cpp
rm -rfv build-$@ rm -rfv build-$@
$(info ${GREEN}I locate-anything-cpp build info:fallback${RESET}) $(info ${GREEN}I locate-anything-cpp build info:fallback${RESET})
SO_TARGET=$@ CMAKE_ARGS="$(CMAKE_ARGS) -DGGML_AVX=off -DGGML_AVX2=off -DGGML_AVX512=off -DGGML_FMA=off -DGGML_F16C=off -DGGML_BMI2=off" $(MAKE) liblocateanythingcpp-custom SO_TARGET=$@ CMAKE_ARGS="$(CMAKE_ARGS) -DGGML_AVX=off -DGGML_AVX2=off -DGGML_AVX512=off -DGGML_FMA=off -DGGML_F16C=off -DGGML_BMI2=off" $(MAKE) liblocateanythingcpp-custom
rm -rfv build-$@ rm -rfv build-$@
endif
liblocateanythingcpp-custom: CMakeLists.txt liblocateanythingcpp-custom: CMakeLists.txt
mkdir -p build-$(SO_TARGET) && \ mkdir -p build-$(SO_TARGET) && \
@@ -129,8 +121,7 @@ liblocateanythingcpp-custom: CMakeLists.txt
cmake .. $(CMAKE_ARGS) && \ cmake .. $(CMAKE_ARGS) && \
cmake --build . --config Release -j$(JOBS) && \ cmake --build . --config Release -j$(JOBS) && \
cd .. && \ cd .. && \
(mv build-$(SO_TARGET)/liblocateanythingcpp.so ./$(SO_TARGET) 2>/dev/null || \ mv build-$(SO_TARGET)/liblocateanythingcpp.so ./$(SO_TARGET)
mv build-$(SO_TARGET)/liblocateanythingcpp.dylib ./$(SO_TARGET) 2>/dev/null)
all: locate-anything-cpp package all: locate-anything-cpp package

View File

@@ -9,7 +9,6 @@ package main
import ( import (
"flag" "flag"
"os" "os"
"runtime"
"github.com/ebitengine/purego" "github.com/ebitengine/purego"
grpc "github.com/mudler/LocalAI/pkg/grpc" grpc "github.com/mudler/LocalAI/pkg/grpc"
@@ -28,11 +27,7 @@ func main() {
// Get library name from environment variable, default to fallback // Get library name from environment variable, default to fallback
libName := os.Getenv("LOCATEANYTHING_LIBRARY") libName := os.Getenv("LOCATEANYTHING_LIBRARY")
if libName == "" { if libName == "" {
if runtime.GOOS == "darwin" { libName = "./liblocateanythingcpp-fallback.so"
libName = "./liblocateanythingcpp-fallback.dylib"
} else {
libName = "./liblocateanythingcpp-fallback.so"
}
} }
lib, err := purego.Dlopen(libName, purego.RTLD_NOW|purego.RTLD_GLOBAL) lib, err := purego.Dlopen(libName, purego.RTLD_NOW|purego.RTLD_GLOBAL)

View File

@@ -10,8 +10,7 @@ REPO_ROOT="${CURDIR}/../../.."
# Create lib directory # Create lib directory
mkdir -p $CURDIR/package/lib mkdir -p $CURDIR/package/lib
cp -fv $CURDIR/liblocateanythingcpp-*.so $CURDIR/package/ 2>/dev/null || true cp -avf $CURDIR/liblocateanythingcpp-*.so $CURDIR/package/
cp -fv $CURDIR/liblocateanythingcpp-*.dylib $CURDIR/package/ 2>/dev/null || true
cp -avf $CURDIR/locate-anything-cpp $CURDIR/package/ cp -avf $CURDIR/locate-anything-cpp $CURDIR/package/
cp -fv $CURDIR/run.sh $CURDIR/package/ cp -fv $CURDIR/run.sh $CURDIR/package/

View File

@@ -12,13 +12,9 @@ if [ "$(uname)" != "Darwin" ]; then
grep -e "flags" /proc/cpuinfo | head -1 grep -e "flags" /proc/cpuinfo | head -1
fi fi
if [ "$(uname)" = "Darwin" ]; then LIBRARY="$CURDIR/liblocateanythingcpp-fallback.so"
# macOS: single dylib variant (Metal or Accelerate)
LIBRARY="$CURDIR/liblocateanythingcpp-fallback.dylib"
export DYLD_LIBRARY_PATH=$CURDIR/lib:$DYLD_LIBRARY_PATH
else
LIBRARY="$CURDIR/liblocateanythingcpp-fallback.so"
if [ "$(uname)" != "Darwin" ]; then
if grep -q -e "\savx\s" /proc/cpuinfo ; then if grep -q -e "\savx\s" /proc/cpuinfo ; then
echo "CPU: AVX found OK" echo "CPU: AVX found OK"
if [ -e $CURDIR/liblocateanythingcpp-avx.so ]; then if [ -e $CURDIR/liblocateanythingcpp-avx.so ]; then
@@ -40,10 +36,9 @@ else
LIBRARY="$CURDIR/liblocateanythingcpp-avx512.so" LIBRARY="$CURDIR/liblocateanythingcpp-avx512.so"
fi fi
fi fi
export LD_LIBRARY_PATH=$CURDIR/lib:$LD_LIBRARY_PATH
fi fi
export LD_LIBRARY_PATH=$CURDIR/lib:$LD_LIBRARY_PATH
export LOCATEANYTHING_LIBRARY=$LIBRARY export LOCATEANYTHING_LIBRARY=$LIBRARY
# If there is a lib/ld.so, use it # If there is a lib/ld.so, use it

View File

@@ -65,8 +65,7 @@ UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux) ifeq ($(UNAME_S),Linux)
VARIANT_TARGETS = libgomnivoicecpp-avx.so libgomnivoicecpp-avx2.so libgomnivoicecpp-avx512.so libgomnivoicecpp-fallback.so VARIANT_TARGETS = libgomnivoicecpp-avx.so libgomnivoicecpp-avx2.so libgomnivoicecpp-avx512.so libgomnivoicecpp-fallback.so
else else
# On non-Linux (e.g., Darwin), build only fallback variant (as a dylib) VARIANT_TARGETS = libgomnivoicecpp-fallback.so
VARIANT_TARGETS = libgomnivoicecpp-fallback.dylib
endif endif
omnivoice-cpp: main.go gomnivoicecpp.go $(VARIANT_TARGETS) omnivoice-cpp: main.go gomnivoicecpp.go $(VARIANT_TARGETS)
@@ -78,7 +77,7 @@ package: omnivoice-cpp
build: package build: package
clean: purge clean: purge
rm -rf libgomnivoicecpp*.so libgomnivoicecpp*.dylib package sources/omnivoice.cpp omnivoice-cpp rm -rf libgomnivoicecpp*.so package sources/omnivoice.cpp omnivoice-cpp
purge: purge:
rm -rf build* rm -rf build*
@@ -107,20 +106,13 @@ libgomnivoicecpp-fallback.so: sources/omnivoice.cpp
SO_TARGET=libgomnivoicecpp-fallback.so CMAKE_ARGS="$(CMAKE_ARGS) -DGGML_AVX=off -DGGML_AVX2=off -DGGML_AVX512=off -DGGML_FMA=off -DGGML_F16C=off -DGGML_BMI2=off" $(MAKE) libgomnivoicecpp-custom SO_TARGET=libgomnivoicecpp-fallback.so CMAKE_ARGS="$(CMAKE_ARGS) -DGGML_AVX=off -DGGML_AVX2=off -DGGML_AVX512=off -DGGML_FMA=off -DGGML_F16C=off -DGGML_BMI2=off" $(MAKE) libgomnivoicecpp-custom
rm -rf build-libgomnivoicecpp-fallback.so rm -rf build-libgomnivoicecpp-fallback.so
# Build fallback variant as a dylib (Darwin)
libgomnivoicecpp-fallback.dylib: sources/omnivoice.cpp
$(info ${GREEN}I omnivoice-cpp build info:fallback (dylib)${RESET})
SO_TARGET=libgomnivoicecpp-fallback.dylib CMAKE_ARGS="$(CMAKE_ARGS) -DGGML_AVX=off -DGGML_AVX2=off -DGGML_AVX512=off -DGGML_FMA=off -DGGML_F16C=off -DGGML_BMI2=off" $(MAKE) libgomnivoicecpp-custom
rm -rf build-libgomnivoicecpp-fallback.dylib
libgomnivoicecpp-custom: CMakeLists.txt cpp/gomnivoicecpp.cpp cpp/gomnivoicecpp.h libgomnivoicecpp-custom: CMakeLists.txt cpp/gomnivoicecpp.cpp cpp/gomnivoicecpp.h
mkdir -p build-$(SO_TARGET) && \ mkdir -p build-$(SO_TARGET) && \
cd build-$(SO_TARGET) && \ cd build-$(SO_TARGET) && \
cmake .. $(CMAKE_ARGS) && \ cmake .. $(CMAKE_ARGS) && \
cmake --build . --config Release -j$(JOBS) --target gomnivoicecpp && \ cmake --build . --config Release -j$(JOBS) --target gomnivoicecpp && \
cd .. && \ cd .. && \
(mv build-$(SO_TARGET)/libgomnivoicecpp.so ./$(SO_TARGET) 2>/dev/null || \ mv build-$(SO_TARGET)/libgomnivoicecpp.so ./$(SO_TARGET)
mv build-$(SO_TARGET)/libgomnivoicecpp.dylib ./$(SO_TARGET) 2>/dev/null)
test: omnivoice-cpp test: omnivoice-cpp
@echo "Running omnivoice-cpp tests..." @echo "Running omnivoice-cpp tests..."

View File

@@ -4,7 +4,6 @@ package main
import ( import (
"flag" "flag"
"os" "os"
"runtime"
"github.com/ebitengine/purego" "github.com/ebitengine/purego"
grpc "github.com/mudler/LocalAI/pkg/grpc" grpc "github.com/mudler/LocalAI/pkg/grpc"
@@ -22,11 +21,7 @@ type LibFuncs struct {
func main() { func main() {
libName := os.Getenv("OMNIVOICE_LIBRARY") libName := os.Getenv("OMNIVOICE_LIBRARY")
if libName == "" { if libName == "" {
if runtime.GOOS == "darwin" { libName = "./libgomnivoicecpp-fallback.so"
libName = "./libgomnivoicecpp-fallback.dylib"
} else {
libName = "./libgomnivoicecpp-fallback.so"
}
} }
lib, err := purego.Dlopen(libName, purego.RTLD_NOW|purego.RTLD_GLOBAL) lib, err := purego.Dlopen(libName, purego.RTLD_NOW|purego.RTLD_GLOBAL)

View File

@@ -12,8 +12,7 @@ REPO_ROOT="${CURDIR}/../../.."
mkdir -p $CURDIR/package/lib mkdir -p $CURDIR/package/lib
cp -avf $CURDIR/omnivoice-cpp $CURDIR/package/ cp -avf $CURDIR/omnivoice-cpp $CURDIR/package/
cp -fv $CURDIR/libgomnivoicecpp-*.so $CURDIR/package/ 2>/dev/null || true cp -fv $CURDIR/libgomnivoicecpp-*.so $CURDIR/package/
cp -fv $CURDIR/libgomnivoicecpp-*.dylib $CURDIR/package/ 2>/dev/null || true
cp -fv $CURDIR/run.sh $CURDIR/package/ cp -fv $CURDIR/run.sh $CURDIR/package/
# Detect architecture and copy appropriate libraries # Detect architecture and copy appropriate libraries

View File

@@ -12,13 +12,9 @@ if [ "$(uname)" != "Darwin" ]; then
grep -e "flags" /proc/cpuinfo | head -1 grep -e "flags" /proc/cpuinfo | head -1
fi fi
if [ "$(uname)" = "Darwin" ]; then LIBRARY="$CURDIR/libgomnivoicecpp-fallback.so"
# macOS: single dylib variant (Metal or Accelerate)
LIBRARY="$CURDIR/libgomnivoicecpp-fallback.dylib"
export DYLD_LIBRARY_PATH=$CURDIR/lib:$DYLD_LIBRARY_PATH
else
LIBRARY="$CURDIR/libgomnivoicecpp-fallback.so"
if [ "$(uname)" != "Darwin" ]; then
if grep -q -e "\savx\s" /proc/cpuinfo ; then if grep -q -e "\savx\s" /proc/cpuinfo ; then
echo "CPU: AVX found OK" echo "CPU: AVX found OK"
if [ -e $CURDIR/libgomnivoicecpp-avx.so ]; then if [ -e $CURDIR/libgomnivoicecpp-avx.so ]; then
@@ -40,10 +36,9 @@ else
LIBRARY="$CURDIR/libgomnivoicecpp-avx512.so" LIBRARY="$CURDIR/libgomnivoicecpp-avx512.so"
fi fi
fi fi
export LD_LIBRARY_PATH=$CURDIR/lib:$LD_LIBRARY_PATH
fi fi
export LD_LIBRARY_PATH=$CURDIR/lib:$LD_LIBRARY_PATH
export OMNIVOICE_LIBRARY=$LIBRARY export OMNIVOICE_LIBRARY=$LIBRARY
# If there is a lib/ld.so, use it # If there is a lib/ld.so, use it

View File

@@ -74,7 +74,6 @@ libparakeet.so: sources/parakeet.cpp
cmake -B sources/parakeet.cpp/build-shared -S sources/parakeet.cpp $(CMAKE_ARGS) cmake -B sources/parakeet.cpp/build-shared -S sources/parakeet.cpp $(CMAKE_ARGS)
cmake --build sources/parakeet.cpp/build-shared --config Release -j$(JOBS) cmake --build sources/parakeet.cpp/build-shared --config Release -j$(JOBS)
cp -fv sources/parakeet.cpp/build-shared/libparakeet.so* ./ 2>/dev/null || true cp -fv sources/parakeet.cpp/build-shared/libparakeet.so* ./ 2>/dev/null || true
cp -fv sources/parakeet.cpp/build-shared/libparakeet.dylib ./ 2>/dev/null || true
cp -fv sources/parakeet.cpp/include/parakeet_capi.h ./ cp -fv sources/parakeet.cpp/include/parakeet_capi.h ./
parakeet-cpp-grpc: libparakeet.so main.go goparakeetcpp.go parakeet-cpp-grpc: libparakeet.so main.go goparakeetcpp.go

View File

@@ -2,17 +2,15 @@ package main
// Started internally by LocalAI - one gRPC server per loaded model. // Started internally by LocalAI - one gRPC server per loaded model.
// //
// Loads the parakeet shared library via purego and registers the flat // Loads libparakeet.so via purego and registers the flat C-API entry
// C-API entry points declared in parakeet_capi.h. The library name can be // points declared in parakeet_capi.h. The library name can be overridden
// overridden with PARAKEET_LIBRARY (mirrors the WHISPER_LIBRARY / // with PARAKEET_LIBRARY (mirrors the WHISPER_LIBRARY / VIBEVOICECPP_LIBRARY
// VIBEVOICECPP_LIBRARY convention in the sibling backends); the default // convention in the sibling backends); the default looks for the .so next
// looks next to this binary for libparakeet.so on Linux and // to this binary.
// libparakeet.dylib on macOS.
import ( import (
"flag" "flag"
"fmt" "fmt"
"os" "os"
"runtime"
"github.com/ebitengine/purego" "github.com/ebitengine/purego"
grpc "github.com/mudler/LocalAI/pkg/grpc" grpc "github.com/mudler/LocalAI/pkg/grpc"
@@ -30,11 +28,7 @@ type LibFuncs struct {
func main() { func main() {
libName := os.Getenv("PARAKEET_LIBRARY") libName := os.Getenv("PARAKEET_LIBRARY")
if libName == "" { if libName == "" {
if runtime.GOOS == "darwin" { libName = "libparakeet.so"
libName = "libparakeet.dylib"
} else {
libName = "libparakeet.so"
}
} }
lib, err := purego.Dlopen(libName, purego.RTLD_NOW|purego.RTLD_GLOBAL) lib, err := purego.Dlopen(libName, purego.RTLD_NOW|purego.RTLD_GLOBAL)

View File

@@ -16,15 +16,12 @@ mkdir -p "$CURDIR/package/lib"
cp -avf "$CURDIR/parakeet-cpp-grpc" "$CURDIR/package/" cp -avf "$CURDIR/parakeet-cpp-grpc" "$CURDIR/package/"
cp -avf "$CURDIR/run.sh" "$CURDIR/package/" cp -avf "$CURDIR/run.sh" "$CURDIR/package/"
# libparakeet shared lib + any soname symlinks. On Linux this is # libparakeet.so + any soname symlinks (libparakeet.so.X[.Y]). purego.Dlopen
# libparakeet.so[.X.Y]; on macOS it is libparakeet.dylib. purego.Dlopen # resolves it via LD_LIBRARY_PATH, which run.sh points at lib/.
# resolves it via the *_LIBRARY_PATH that run.sh points at lib/. cp -avf "$CURDIR"/libparakeet.so* "$CURDIR/package/lib/" 2>/dev/null || {
cp -avf "$CURDIR"/libparakeet.so* "$CURDIR/package/lib/" 2>/dev/null || true echo "ERROR: libparakeet.so not found in $CURDIR, run 'make' first" >&2
cp -avf "$CURDIR"/libparakeet.dylib "$CURDIR/package/lib/" 2>/dev/null || true
if ! ls "$CURDIR"/package/lib/libparakeet.* >/dev/null 2>&1; then
echo "ERROR: libparakeet shared library not found in $CURDIR, run 'make' first" >&2
exit 1 exit 1
fi }
# Detect architecture and copy the core runtime libs libparakeet.so links # Detect architecture and copy the core runtime libs libparakeet.so links
# against, plus the matching dynamic loader as lib/ld.so. # against, plus the matching dynamic loader as lib/ld.so.
@@ -51,7 +48,7 @@ elif [ -f "/lib/ld-linux-aarch64.so.1" ]; then
cp -arfLv /lib/aarch64-linux-gnu/librt.so.1 "$CURDIR/package/lib/librt.so.1" cp -arfLv /lib/aarch64-linux-gnu/librt.so.1 "$CURDIR/package/lib/librt.so.1"
cp -arfLv /lib/aarch64-linux-gnu/libpthread.so.0 "$CURDIR/package/lib/libpthread.so.0" cp -arfLv /lib/aarch64-linux-gnu/libpthread.so.0 "$CURDIR/package/lib/libpthread.so.0"
elif [ "$(uname -s)" = "Darwin" ]; then elif [ "$(uname -s)" = "Darwin" ]; then
echo "Detected Darwin — system frameworks linked dynamically, no bundled libs needed" echo "Detected Darwin"
else else
echo "Error: Could not detect architecture" echo "Error: Could not detect architecture"
exit 1 exit 1

View File

@@ -3,17 +3,11 @@ set -e
CURDIR=$(dirname "$(realpath "$0")") CURDIR=$(dirname "$(realpath "$0")")
if [ "$(uname)" = "Darwin" ]; then export LD_LIBRARY_PATH="$CURDIR/lib:$CURDIR:${LD_LIBRARY_PATH:-}"
export DYLD_LIBRARY_PATH="$CURDIR/lib:$CURDIR:${DYLD_LIBRARY_PATH:-}"
export PARAKEET_LIBRARY="$CURDIR/lib/libparakeet.dylib"
else
export LD_LIBRARY_PATH="$CURDIR/lib:$CURDIR:${LD_LIBRARY_PATH:-}"
export PARAKEET_LIBRARY="$CURDIR/lib/libparakeet.so"
fi
# If a self-contained ld.so was packaged, route through it so the # If a self-contained ld.so was packaged, route through it so the
# packaged libc / libstdc++ are used instead of the host's (matches the # packaged libc / libstdc++ are used instead of the host's (matches the
# whisper backend's runtime layout). Linux only. # whisper backend's runtime layout).
if [ -f "$CURDIR/lib/ld.so" ]; then if [ -f "$CURDIR/lib/ld.so" ]; then
echo "Using lib/ld.so" echo "Using lib/ld.so"
exec "$CURDIR/lib/ld.so" "$CURDIR/parakeet-cpp-grpc" "$@" exec "$CURDIR/lib/ld.so" "$CURDIR/parakeet-cpp-grpc" "$@"

View File

@@ -65,8 +65,8 @@ UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux) ifeq ($(UNAME_S),Linux)
VARIANT_TARGETS = libgoqwen3ttscpp-avx.so libgoqwen3ttscpp-avx2.so libgoqwen3ttscpp-avx512.so libgoqwen3ttscpp-fallback.so VARIANT_TARGETS = libgoqwen3ttscpp-avx.so libgoqwen3ttscpp-avx2.so libgoqwen3ttscpp-avx512.so libgoqwen3ttscpp-fallback.so
else else
# On non-Linux (e.g., Darwin), build only fallback variant (as a dylib) # On non-Linux (e.g., Darwin), build only fallback variant
VARIANT_TARGETS = libgoqwen3ttscpp-fallback.dylib VARIANT_TARGETS = libgoqwen3ttscpp-fallback.so
endif endif
qwen3-tts-cpp: main.go goqwen3ttscpp.go $(VARIANT_TARGETS) qwen3-tts-cpp: main.go goqwen3ttscpp.go $(VARIANT_TARGETS)
@@ -78,7 +78,7 @@ package: qwen3-tts-cpp
build: package build: package
clean: purge clean: purge
rm -rf libgoqwen3ttscpp*.so libgoqwen3ttscpp*.dylib package sources/qwentts.cpp qwen3-tts-cpp rm -rf libgoqwen3ttscpp*.so package sources/qwentts.cpp qwen3-tts-cpp
purge: purge:
rm -rf build* rm -rf build*
@@ -110,20 +110,13 @@ libgoqwen3ttscpp-fallback.so: sources/qwentts.cpp
SO_TARGET=libgoqwen3ttscpp-fallback.so CMAKE_ARGS="$(CMAKE_ARGS) -DGGML_AVX=off -DGGML_AVX2=off -DGGML_AVX512=off -DGGML_FMA=off -DGGML_F16C=off -DGGML_BMI2=off" $(MAKE) libgoqwen3ttscpp-custom SO_TARGET=libgoqwen3ttscpp-fallback.so CMAKE_ARGS="$(CMAKE_ARGS) -DGGML_AVX=off -DGGML_AVX2=off -DGGML_AVX512=off -DGGML_FMA=off -DGGML_F16C=off -DGGML_BMI2=off" $(MAKE) libgoqwen3ttscpp-custom
rm -rf build-libgoqwen3ttscpp-fallback.so rm -rf build-libgoqwen3ttscpp-fallback.so
# Build fallback variant as a dylib (Darwin)
libgoqwen3ttscpp-fallback.dylib: sources/qwentts.cpp
$(info ${GREEN}I qwen3-tts-cpp build info:fallback (dylib)${RESET})
SO_TARGET=libgoqwen3ttscpp-fallback.dylib CMAKE_ARGS="$(CMAKE_ARGS) -DGGML_AVX=off -DGGML_AVX2=off -DGGML_AVX512=off -DGGML_FMA=off -DGGML_F16C=off -DGGML_BMI2=off" $(MAKE) libgoqwen3ttscpp-custom
rm -rf build-libgoqwen3ttscpp-fallback.dylib
libgoqwen3ttscpp-custom: CMakeLists.txt cpp/goqwen3ttscpp.cpp cpp/goqwen3ttscpp.h libgoqwen3ttscpp-custom: CMakeLists.txt cpp/goqwen3ttscpp.cpp cpp/goqwen3ttscpp.h
mkdir -p build-$(SO_TARGET) && \ mkdir -p build-$(SO_TARGET) && \
cd build-$(SO_TARGET) && \ cd build-$(SO_TARGET) && \
cmake .. $(CMAKE_ARGS) && \ cmake .. $(CMAKE_ARGS) && \
cmake --build . --config Release -j$(JOBS) --target goqwen3ttscpp && \ cmake --build . --config Release -j$(JOBS) --target goqwen3ttscpp && \
cd .. && \ cd .. && \
(mv build-$(SO_TARGET)/libgoqwen3ttscpp.so ./$(SO_TARGET) 2>/dev/null || \ mv build-$(SO_TARGET)/libgoqwen3ttscpp.so ./$(SO_TARGET)
mv build-$(SO_TARGET)/libgoqwen3ttscpp.dylib ./$(SO_TARGET) 2>/dev/null)
test: qwen3-tts-cpp test: qwen3-tts-cpp
@echo "Running qwen3-tts-cpp tests..." @echo "Running qwen3-tts-cpp tests..."

View File

@@ -4,7 +4,6 @@ package main
import ( import (
"flag" "flag"
"os" "os"
"runtime"
"github.com/ebitengine/purego" "github.com/ebitengine/purego"
grpc "github.com/mudler/LocalAI/pkg/grpc" grpc "github.com/mudler/LocalAI/pkg/grpc"
@@ -22,11 +21,7 @@ type LibFuncs struct {
func main() { func main() {
libName := os.Getenv("QWEN3TTS_LIBRARY") libName := os.Getenv("QWEN3TTS_LIBRARY")
if libName == "" { if libName == "" {
if runtime.GOOS == "darwin" { libName = "./libgoqwen3ttscpp-fallback.so"
libName = "./libgoqwen3ttscpp-fallback.dylib"
} else {
libName = "./libgoqwen3ttscpp-fallback.so"
}
} }
lib, err := purego.Dlopen(libName, purego.RTLD_NOW|purego.RTLD_GLOBAL) lib, err := purego.Dlopen(libName, purego.RTLD_NOW|purego.RTLD_GLOBAL)

View File

@@ -12,8 +12,7 @@ REPO_ROOT="${CURDIR}/../../.."
mkdir -p $CURDIR/package/lib mkdir -p $CURDIR/package/lib
cp -avf $CURDIR/qwen3-tts-cpp $CURDIR/package/ cp -avf $CURDIR/qwen3-tts-cpp $CURDIR/package/
cp -fv $CURDIR/libgoqwen3ttscpp-*.so $CURDIR/package/ 2>/dev/null || true cp -fv $CURDIR/libgoqwen3ttscpp-*.so $CURDIR/package/
cp -fv $CURDIR/libgoqwen3ttscpp-*.dylib $CURDIR/package/ 2>/dev/null || true
cp -fv $CURDIR/run.sh $CURDIR/package/ cp -fv $CURDIR/run.sh $CURDIR/package/
# Detect architecture and copy appropriate libraries # Detect architecture and copy appropriate libraries

View File

@@ -12,13 +12,9 @@ if [ "$(uname)" != "Darwin" ]; then
grep -e "flags" /proc/cpuinfo | head -1 grep -e "flags" /proc/cpuinfo | head -1
fi fi
if [ "$(uname)" = "Darwin" ]; then LIBRARY="$CURDIR/libgoqwen3ttscpp-fallback.so"
# macOS: single dylib variant (Metal or Accelerate)
LIBRARY="$CURDIR/libgoqwen3ttscpp-fallback.dylib"
export DYLD_LIBRARY_PATH=$CURDIR/lib:$DYLD_LIBRARY_PATH
else
LIBRARY="$CURDIR/libgoqwen3ttscpp-fallback.so"
if [ "$(uname)" != "Darwin" ]; then
if grep -q -e "\savx\s" /proc/cpuinfo ; then if grep -q -e "\savx\s" /proc/cpuinfo ; then
echo "CPU: AVX found OK" echo "CPU: AVX found OK"
if [ -e $CURDIR/libgoqwen3ttscpp-avx.so ]; then if [ -e $CURDIR/libgoqwen3ttscpp-avx.so ]; then
@@ -40,10 +36,9 @@ else
LIBRARY="$CURDIR/libgoqwen3ttscpp-avx512.so" LIBRARY="$CURDIR/libgoqwen3ttscpp-avx512.so"
fi fi
fi fi
export LD_LIBRARY_PATH=$CURDIR/lib:$LD_LIBRARY_PATH
fi fi
export LD_LIBRARY_PATH=$CURDIR/lib:$LD_LIBRARY_PATH
export QWEN3TTS_LIBRARY=$LIBRARY export QWEN3TTS_LIBRARY=$LIBRARY
# If there is a lib/ld.so, use it # If there is a lib/ld.so, use it

View File

@@ -71,7 +71,7 @@ ifeq ($(UNAME_S),Linux)
VARIANT_TARGETS = librfdetrcpp-avx.so librfdetrcpp-avx2.so librfdetrcpp-avx512.so librfdetrcpp-fallback.so VARIANT_TARGETS = librfdetrcpp-avx.so librfdetrcpp-avx2.so librfdetrcpp-avx512.so librfdetrcpp-fallback.so
else else
# On non-Linux (e.g., Darwin), build only fallback variant # On non-Linux (e.g., Darwin), build only fallback variant
VARIANT_TARGETS = librfdetrcpp-fallback.dylib VARIANT_TARGETS = librfdetrcpp-fallback.so
endif endif
rfdetr-cpp: main.go gorfdetrcpp.go $(VARIANT_TARGETS) rfdetr-cpp: main.go gorfdetrcpp.go $(VARIANT_TARGETS)
@@ -83,7 +83,7 @@ package: rfdetr-cpp
build: package build: package
clean: purge clean: purge
rm -rf librfdetrcpp*.so librfdetrcpp*.dylib rfdetr-cpp package sources rm -rf librfdetrcpp*.so rfdetr-cpp package sources
purge: purge:
rm -rf build* rm -rf build*
@@ -110,19 +110,11 @@ librfdetrcpp-avx512.so: sources/rt-detr.cpp
endif endif
# Build fallback variant (all platforms) # Build fallback variant (all platforms)
ifeq ($(UNAME_S),Darwin)
librfdetrcpp-fallback.dylib: sources/rt-detr.cpp
rm -rfv build-$@
$(info ${GREEN}I rfdetr-cpp build info:fallback${RESET})
SO_TARGET=$@ CMAKE_ARGS="$(CMAKE_ARGS) -DGGML_AVX=off -DGGML_AVX2=off -DGGML_AVX512=off -DGGML_FMA=off -DGGML_F16C=off -DGGML_BMI2=off" $(MAKE) librfdetrcpp-custom
rm -rfv build-$@
else
librfdetrcpp-fallback.so: sources/rt-detr.cpp librfdetrcpp-fallback.so: sources/rt-detr.cpp
rm -rfv build-$@ rm -rfv build-$@
$(info ${GREEN}I rfdetr-cpp build info:fallback${RESET}) $(info ${GREEN}I rfdetr-cpp build info:fallback${RESET})
SO_TARGET=$@ CMAKE_ARGS="$(CMAKE_ARGS) -DGGML_AVX=off -DGGML_AVX2=off -DGGML_AVX512=off -DGGML_FMA=off -DGGML_F16C=off -DGGML_BMI2=off" $(MAKE) librfdetrcpp-custom SO_TARGET=$@ CMAKE_ARGS="$(CMAKE_ARGS) -DGGML_AVX=off -DGGML_AVX2=off -DGGML_AVX512=off -DGGML_FMA=off -DGGML_F16C=off -DGGML_BMI2=off" $(MAKE) librfdetrcpp-custom
rm -rfv build-$@ rm -rfv build-$@
endif
librfdetrcpp-custom: CMakeLists.txt librfdetrcpp-custom: CMakeLists.txt
mkdir -p build-$(SO_TARGET) && \ mkdir -p build-$(SO_TARGET) && \
@@ -130,8 +122,7 @@ librfdetrcpp-custom: CMakeLists.txt
cmake .. $(CMAKE_ARGS) && \ cmake .. $(CMAKE_ARGS) && \
cmake --build . --config Release -j$(JOBS) && \ cmake --build . --config Release -j$(JOBS) && \
cd .. && \ cd .. && \
(mv build-$(SO_TARGET)/librfdetrcpp.so ./$(SO_TARGET) 2>/dev/null || \ mv build-$(SO_TARGET)/librfdetrcpp.so ./$(SO_TARGET)
mv build-$(SO_TARGET)/librfdetrcpp.dylib ./$(SO_TARGET) 2>/dev/null)
all: rfdetr-cpp package all: rfdetr-cpp package

View File

@@ -9,7 +9,6 @@ package main
import ( import (
"flag" "flag"
"os" "os"
"runtime"
"github.com/ebitengine/purego" "github.com/ebitengine/purego"
grpc "github.com/mudler/LocalAI/pkg/grpc" grpc "github.com/mudler/LocalAI/pkg/grpc"
@@ -28,11 +27,7 @@ func main() {
// Get library name from environment variable, default to fallback // Get library name from environment variable, default to fallback
libName := os.Getenv("RFDETR_LIBRARY") libName := os.Getenv("RFDETR_LIBRARY")
if libName == "" { if libName == "" {
if runtime.GOOS == "darwin" { libName = "./librfdetrcpp-fallback.so"
libName = "./librfdetrcpp-fallback.dylib"
} else {
libName = "./librfdetrcpp-fallback.so"
}
} }
rfdetrLib, err := purego.Dlopen(libName, purego.RTLD_NOW|purego.RTLD_GLOBAL) rfdetrLib, err := purego.Dlopen(libName, purego.RTLD_NOW|purego.RTLD_GLOBAL)

View File

@@ -10,8 +10,7 @@ REPO_ROOT="${CURDIR}/../../.."
# Create lib directory # Create lib directory
mkdir -p $CURDIR/package/lib mkdir -p $CURDIR/package/lib
cp -fv $CURDIR/librfdetrcpp-*.so $CURDIR/package/ 2>/dev/null || true cp -avf $CURDIR/librfdetrcpp-*.so $CURDIR/package/
cp -fv $CURDIR/librfdetrcpp-*.dylib $CURDIR/package/ 2>/dev/null || true
cp -avf $CURDIR/rfdetr-cpp $CURDIR/package/ cp -avf $CURDIR/rfdetr-cpp $CURDIR/package/
cp -fv $CURDIR/run.sh $CURDIR/package/ cp -fv $CURDIR/run.sh $CURDIR/package/

View File

@@ -12,13 +12,9 @@ if [ "$(uname)" != "Darwin" ]; then
grep -e "flags" /proc/cpuinfo | head -1 grep -e "flags" /proc/cpuinfo | head -1
fi fi
if [ "$(uname)" = "Darwin" ]; then LIBRARY="$CURDIR/librfdetrcpp-fallback.so"
# macOS: single dylib variant (Metal or Accelerate)
LIBRARY="$CURDIR/librfdetrcpp-fallback.dylib"
export DYLD_LIBRARY_PATH=$CURDIR/lib:$DYLD_LIBRARY_PATH
else
LIBRARY="$CURDIR/librfdetrcpp-fallback.so"
if [ "$(uname)" != "Darwin" ]; then
if grep -q -e "\savx\s" /proc/cpuinfo ; then if grep -q -e "\savx\s" /proc/cpuinfo ; then
echo "CPU: AVX found OK" echo "CPU: AVX found OK"
if [ -e $CURDIR/librfdetrcpp-avx.so ]; then if [ -e $CURDIR/librfdetrcpp-avx.so ]; then
@@ -40,10 +36,9 @@ else
LIBRARY="$CURDIR/librfdetrcpp-avx512.so" LIBRARY="$CURDIR/librfdetrcpp-avx512.so"
fi fi
fi fi
export LD_LIBRARY_PATH=$CURDIR/lib:$LD_LIBRARY_PATH
fi fi
export LD_LIBRARY_PATH=$CURDIR/lib:$LD_LIBRARY_PATH
export RFDETR_LIBRARY=$LIBRARY export RFDETR_LIBRARY=$LIBRARY
# If there is a lib/ld.so, use it # If there is a lib/ld.so, use it

View File

@@ -66,7 +66,7 @@ ifeq ($(UNAME_S),Linux)
VARIANT_TARGETS = libgosam3-avx.so libgosam3-avx2.so libgosam3-avx512.so libgosam3-fallback.so VARIANT_TARGETS = libgosam3-avx.so libgosam3-avx2.so libgosam3-avx512.so libgosam3-fallback.so
else else
# On non-Linux (e.g., Darwin), build only fallback variant # On non-Linux (e.g., Darwin), build only fallback variant
VARIANT_TARGETS = libgosam3-fallback.dylib VARIANT_TARGETS = libgosam3-fallback.so
endif endif
sam3-cpp: main.go gosam3.go $(VARIANT_TARGETS) sam3-cpp: main.go gosam3.go $(VARIANT_TARGETS)
@@ -78,7 +78,7 @@ package: sam3-cpp
build: package build: package
clean: purge clean: purge
rm -rf libgosam3*.so libgosam3*.dylib sam3-cpp package sources rm -rf libgosam3*.so sam3-cpp package sources
purge: purge:
rm -rf build* rm -rf build*
@@ -105,19 +105,11 @@ libgosam3-avx512.so: sources/sam3.cpp
endif endif
# Build fallback variant (all platforms) # Build fallback variant (all platforms)
ifeq ($(UNAME_S),Darwin)
libgosam3-fallback.dylib: sources/sam3.cpp
$(MAKE) purge
$(info ${GREEN}I sam3-cpp build info:fallback${RESET})
SO_TARGET=libgosam3-fallback.dylib CMAKE_ARGS="$(CMAKE_ARGS) -DGGML_AVX=off -DGGML_AVX2=off -DGGML_AVX512=off -DGGML_FMA=off -DGGML_F16C=off -DGGML_BMI2=off" $(MAKE) libgosam3-custom
rm -rfv build*
else
libgosam3-fallback.so: sources/sam3.cpp libgosam3-fallback.so: sources/sam3.cpp
$(MAKE) purge $(MAKE) purge
$(info ${GREEN}I sam3-cpp build info:fallback${RESET}) $(info ${GREEN}I sam3-cpp build info:fallback${RESET})
SO_TARGET=libgosam3-fallback.so CMAKE_ARGS="$(CMAKE_ARGS) -DGGML_AVX=off -DGGML_AVX2=off -DGGML_AVX512=off -DGGML_FMA=off -DGGML_F16C=off -DGGML_BMI2=off" $(MAKE) libgosam3-custom SO_TARGET=libgosam3-fallback.so CMAKE_ARGS="$(CMAKE_ARGS) -DGGML_AVX=off -DGGML_AVX2=off -DGGML_AVX512=off -DGGML_FMA=off -DGGML_F16C=off -DGGML_BMI2=off" $(MAKE) libgosam3-custom
rm -rfv build* rm -rfv build*
endif
libgosam3-custom: CMakeLists.txt cpp/gosam3.cpp cpp/gosam3.h libgosam3-custom: CMakeLists.txt cpp/gosam3.cpp cpp/gosam3.h
mkdir -p build-$(SO_TARGET) && \ mkdir -p build-$(SO_TARGET) && \
@@ -125,7 +117,6 @@ libgosam3-custom: CMakeLists.txt cpp/gosam3.cpp cpp/gosam3.h
cmake .. $(CMAKE_ARGS) && \ cmake .. $(CMAKE_ARGS) && \
cmake --build . --config Release -j$(JOBS) && \ cmake --build . --config Release -j$(JOBS) && \
cd .. && \ cd .. && \
(mv build-$(SO_TARGET)/libgosam3.so ./$(SO_TARGET) 2>/dev/null || \ mv build-$(SO_TARGET)/libgosam3.so ./$(SO_TARGET)
mv build-$(SO_TARGET)/libgosam3.dylib ./$(SO_TARGET) 2>/dev/null)
all: sam3-cpp package all: sam3-cpp package

View File

@@ -3,7 +3,6 @@ package main
import ( import (
"flag" "flag"
"os" "os"
"runtime"
"github.com/ebitengine/purego" "github.com/ebitengine/purego"
grpc "github.com/mudler/LocalAI/pkg/grpc" grpc "github.com/mudler/LocalAI/pkg/grpc"
@@ -22,11 +21,7 @@ func main() {
// Get library name from environment variable, default to fallback // Get library name from environment variable, default to fallback
libName := os.Getenv("SAM3_LIBRARY") libName := os.Getenv("SAM3_LIBRARY")
if libName == "" { if libName == "" {
if runtime.GOOS == "darwin" { libName = "./libgosam3-fallback.so"
libName = "./libgosam3-fallback.dylib"
} else {
libName = "./libgosam3-fallback.so"
}
} }
gosamLib, err := purego.Dlopen(libName, purego.RTLD_NOW|purego.RTLD_GLOBAL) gosamLib, err := purego.Dlopen(libName, purego.RTLD_NOW|purego.RTLD_GLOBAL)

View File

@@ -10,8 +10,7 @@ REPO_ROOT="${CURDIR}/../../.."
# Create lib directory # Create lib directory
mkdir -p $CURDIR/package/lib mkdir -p $CURDIR/package/lib
cp -fv $CURDIR/libgosam3-*.so $CURDIR/package/ 2>/dev/null || true cp -avf $CURDIR/libgosam3-*.so $CURDIR/package/
cp -fv $CURDIR/libgosam3-*.dylib $CURDIR/package/ 2>/dev/null || true
cp -avf $CURDIR/sam3-cpp $CURDIR/package/ cp -avf $CURDIR/sam3-cpp $CURDIR/package/
cp -fv $CURDIR/run.sh $CURDIR/package/ cp -fv $CURDIR/run.sh $CURDIR/package/

View File

@@ -12,13 +12,9 @@ if [ "$(uname)" != "Darwin" ]; then
grep -e "flags" /proc/cpuinfo | head -1 grep -e "flags" /proc/cpuinfo | head -1
fi fi
if [ "$(uname)" = "Darwin" ]; then LIBRARY="$CURDIR/libgosam3-fallback.so"
# macOS: single dylib variant (Metal or Accelerate)
LIBRARY="$CURDIR/libgosam3-fallback.dylib"
export DYLD_LIBRARY_PATH=$CURDIR/lib:$DYLD_LIBRARY_PATH
else
LIBRARY="$CURDIR/libgosam3-fallback.so"
if [ "$(uname)" != "Darwin" ]; then
if grep -q -e "\savx\s" /proc/cpuinfo ; then if grep -q -e "\savx\s" /proc/cpuinfo ; then
echo "CPU: AVX found OK" echo "CPU: AVX found OK"
if [ -e $CURDIR/libgosam3-avx.so ]; then if [ -e $CURDIR/libgosam3-avx.so ]; then
@@ -40,10 +36,9 @@ else
LIBRARY="$CURDIR/libgosam3-avx512.so" LIBRARY="$CURDIR/libgosam3-avx512.so"
fi fi
fi fi
export LD_LIBRARY_PATH=$CURDIR/lib:$LD_LIBRARY_PATH
fi fi
export LD_LIBRARY_PATH=$CURDIR/lib:$LD_LIBRARY_PATH
export SAM3_LIBRARY=$LIBRARY export SAM3_LIBRARY=$LIBRARY
# If there is a lib/ld.so, use it # If there is a lib/ld.so, use it

View File

@@ -7,7 +7,6 @@ import (
"fmt" "fmt"
"os" "os"
"path/filepath" "path/filepath"
"runtime"
"strconv" "strconv"
"strings" "strings"
"sync" "sync"
@@ -239,19 +238,11 @@ func loadSherpaLibs() error {
func loadSherpaLibsOnce() error { func loadSherpaLibsOnce() error {
shimLib := os.Getenv("SHERPA_SHIM_LIBRARY") shimLib := os.Getenv("SHERPA_SHIM_LIBRARY")
if shimLib == "" { if shimLib == "" {
if runtime.GOOS == "darwin" { shimLib = "libsherpa-shim.so"
shimLib = "libsherpa-shim.dylib"
} else {
shimLib = "libsherpa-shim.so"
}
} }
capiLib := os.Getenv("SHERPA_ONNX_LIBRARY") capiLib := os.Getenv("SHERPA_ONNX_LIBRARY")
if capiLib == "" { if capiLib == "" {
if runtime.GOOS == "darwin" { capiLib = "libsherpa-onnx-c-api.so"
capiLib = "libsherpa-onnx-c-api.dylib"
} else {
capiLib = "libsherpa-onnx-c-api.so"
}
} }
shim, err := purego.Dlopen(shimLib, purego.RTLD_NOW|purego.RTLD_GLOBAL) shim, err := purego.Dlopen(shimLib, purego.RTLD_NOW|purego.RTLD_GLOBAL)

View File

@@ -3,13 +3,7 @@ set -ex
CURDIR=$(dirname "$(realpath $0)") CURDIR=$(dirname "$(realpath $0)")
if [ "$(uname)" = "Darwin" ]; then export LD_LIBRARY_PATH=$CURDIR/lib:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=$CURDIR/lib:$DYLD_LIBRARY_PATH
export SHERPA_SHIM_LIBRARY=$CURDIR/lib/libsherpa-shim.dylib
export SHERPA_ONNX_LIBRARY=$CURDIR/lib/libsherpa-onnx-c-api.dylib
else
export LD_LIBRARY_PATH=$CURDIR/lib:$LD_LIBRARY_PATH
fi
if [ -f $CURDIR/lib/ld.so ]; then if [ -f $CURDIR/lib/ld.so ]; then
echo "Using lib/ld.so" echo "Using lib/ld.so"

View File

@@ -131,7 +131,6 @@ libgosd-custom: CMakeLists.txt cpp/gosd.cpp cpp/gosd.h
cmake .. $(CMAKE_ARGS) && \ cmake .. $(CMAKE_ARGS) && \
cmake --build . --config Release -j$(JOBS) && \ cmake --build . --config Release -j$(JOBS) && \
cd .. && \ cd .. && \
(mv build-$(SO_TARGET)/libgosd.so ./$(SO_TARGET) 2>/dev/null || \ mv build-$(SO_TARGET)/libgosd.so ./$(SO_TARGET)
mv build-$(SO_TARGET)/libgosd.dylib ./$(SO_TARGET) 2>/dev/null)
all: stablediffusion-ggml package all: stablediffusion-ggml package

View File

@@ -3,7 +3,6 @@ package main
import ( import (
"flag" "flag"
"os" "os"
"runtime"
"github.com/ebitengine/purego" "github.com/ebitengine/purego"
grpc "github.com/mudler/LocalAI/pkg/grpc" grpc "github.com/mudler/LocalAI/pkg/grpc"
@@ -22,11 +21,7 @@ func main() {
// Get library name from environment variable, default to fallback // Get library name from environment variable, default to fallback
libName := os.Getenv("SD_LIBRARY") libName := os.Getenv("SD_LIBRARY")
if libName == "" { if libName == "" {
if runtime.GOOS == "darwin" { libName = "./libgosd-fallback.so"
libName = "./libgosd-fallback.dylib"
} else {
libName = "./libgosd-fallback.so"
}
} }
gosd, err := purego.Dlopen(libName, purego.RTLD_NOW|purego.RTLD_GLOBAL) gosd, err := purego.Dlopen(libName, purego.RTLD_NOW|purego.RTLD_GLOBAL)

View File

@@ -12,7 +12,6 @@ REPO_ROOT="${CURDIR}/../../.."
mkdir -p $CURDIR/package/lib mkdir -p $CURDIR/package/lib
cp -avf $CURDIR/libgosd-*.so $CURDIR/package/ cp -avf $CURDIR/libgosd-*.so $CURDIR/package/
cp -fv $CURDIR/libgosd-*.dylib $CURDIR/package/ 2>/dev/null || true
cp -avf $CURDIR/stablediffusion-ggml $CURDIR/package/ cp -avf $CURDIR/stablediffusion-ggml $CURDIR/package/
cp -fv $CURDIR/run.sh $CURDIR/package/ cp -fv $CURDIR/run.sh $CURDIR/package/

View File

@@ -12,18 +12,9 @@ if [ "$(uname)" != "Darwin" ]; then
grep -e "flags" /proc/cpuinfo | head -1 grep -e "flags" /proc/cpuinfo | head -1
fi fi
if [ "$(uname)" = "Darwin" ]; then LIBRARY="$CURDIR/libgosd-fallback.so"
# macOS: single library variant (Metal or Accelerate). The gosd target is
# built as a CMake MODULE, which emits a .dylib for a SHARED build but a
# .so for a MODULE build on Apple, so prefer .dylib and fall back to .so.
LIBRARY="$CURDIR/libgosd-fallback.dylib"
if [ ! -e "$LIBRARY" ]; then
LIBRARY="$CURDIR/libgosd-fallback.so"
fi
export DYLD_LIBRARY_PATH=$CURDIR/lib:$DYLD_LIBRARY_PATH
else
LIBRARY="$CURDIR/libgosd-fallback.so"
if [ "$(uname)" != "Darwin" ]; then
if grep -q -e "\savx\s" /proc/cpuinfo ; then if grep -q -e "\savx\s" /proc/cpuinfo ; then
echo "CPU: AVX found OK" echo "CPU: AVX found OK"
if [ -e $CURDIR/libgosd-avx.so ]; then if [ -e $CURDIR/libgosd-avx.so ]; then
@@ -45,10 +36,9 @@ else
LIBRARY="$CURDIR/libgosd-avx512.so" LIBRARY="$CURDIR/libgosd-avx512.so"
fi fi
fi fi
export LD_LIBRARY_PATH=$CURDIR/lib:$LD_LIBRARY_PATH
fi fi
export LD_LIBRARY_PATH=$CURDIR/lib:$LD_LIBRARY_PATH
export SD_LIBRARY=$LIBRARY export SD_LIBRARY=$LIBRARY
# If there is a lib/ld.so, use it # If there is a lib/ld.so, use it

View File

@@ -70,8 +70,8 @@ UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux) ifeq ($(UNAME_S),Linux)
VARIANT_TARGETS = libgovibevoicecpp-avx.so libgovibevoicecpp-avx2.so libgovibevoicecpp-avx512.so libgovibevoicecpp-fallback.so VARIANT_TARGETS = libgovibevoicecpp-avx.so libgovibevoicecpp-avx2.so libgovibevoicecpp-avx512.so libgovibevoicecpp-fallback.so
else else
# On non-Linux (e.g., Darwin), build only fallback variant (as a dylib) # On non-Linux (e.g., Darwin), build only fallback variant
VARIANT_TARGETS = libgovibevoicecpp-fallback.dylib VARIANT_TARGETS = libgovibevoicecpp-fallback.so
endif endif
vibevoice-cpp: main.go govibevoicecpp.go $(VARIANT_TARGETS) vibevoice-cpp: main.go govibevoicecpp.go $(VARIANT_TARGETS)
@@ -83,7 +83,7 @@ package: vibevoice-cpp
build: package build: package
clean: purge clean: purge
rm -rf libgovibevoicecpp*.so libgovibevoicecpp*.dylib package sources/vibevoice.cpp vibevoice-cpp rm -rf libgovibevoicecpp*.so package sources/vibevoice.cpp vibevoice-cpp
purge: purge:
rm -rf build* rm -rf build*
@@ -119,21 +119,13 @@ libgovibevoicecpp-fallback.so: sources/vibevoice.cpp
SO_TARGET=libgovibevoicecpp-fallback.so CMAKE_ARGS="$(CMAKE_ARGS) -DGGML_AVX=off -DGGML_AVX2=off -DGGML_AVX512=off -DGGML_FMA=off -DGGML_F16C=off -DGGML_BMI2=off" $(MAKE) libgovibevoicecpp-custom SO_TARGET=libgovibevoicecpp-fallback.so CMAKE_ARGS="$(CMAKE_ARGS) -DGGML_AVX=off -DGGML_AVX2=off -DGGML_AVX512=off -DGGML_FMA=off -DGGML_F16C=off -DGGML_BMI2=off" $(MAKE) libgovibevoicecpp-custom
rm -rfv build* rm -rfv build*
# Build fallback variant as a dylib (Darwin)
libgovibevoicecpp-fallback.dylib: sources/vibevoice.cpp
$(MAKE) purge
$(info ${GREEN}I vibevoice-cpp build info:fallback (dylib)${RESET})
SO_TARGET=libgovibevoicecpp-fallback.dylib CMAKE_ARGS="$(CMAKE_ARGS) -DGGML_AVX=off -DGGML_AVX2=off -DGGML_AVX512=off -DGGML_FMA=off -DGGML_F16C=off -DGGML_BMI2=off" $(MAKE) libgovibevoicecpp-custom
rm -rfv build*
libgovibevoicecpp-custom: CMakeLists.txt cpp/govibevoicecpp.cpp cpp/govibevoicecpp.h libgovibevoicecpp-custom: CMakeLists.txt cpp/govibevoicecpp.cpp cpp/govibevoicecpp.h
mkdir -p build-$(SO_TARGET) && \ mkdir -p build-$(SO_TARGET) && \
cd build-$(SO_TARGET) && \ cd build-$(SO_TARGET) && \
cmake .. $(CMAKE_ARGS) && \ cmake .. $(CMAKE_ARGS) && \
cmake --build . --config Release -j$(JOBS) --target govibevoicecpp && \ cmake --build . --config Release -j$(JOBS) --target govibevoicecpp && \
cd .. && \ cd .. && \
(mv build-$(SO_TARGET)/libgovibevoicecpp.so ./$(SO_TARGET) 2>/dev/null || \ mv build-$(SO_TARGET)/libgovibevoicecpp.so ./$(SO_TARGET)
mv build-$(SO_TARGET)/libgovibevoicecpp.dylib ./$(SO_TARGET) 2>/dev/null)
test: vibevoice-cpp test: vibevoice-cpp
@echo "Running vibevoice-cpp tests..." @echo "Running vibevoice-cpp tests..."

View File

@@ -4,7 +4,6 @@ package main
import ( import (
"flag" "flag"
"os" "os"
"runtime"
"github.com/ebitengine/purego" "github.com/ebitengine/purego"
grpc "github.com/mudler/LocalAI/pkg/grpc" grpc "github.com/mudler/LocalAI/pkg/grpc"
@@ -22,11 +21,7 @@ type LibFuncs struct {
func main() { func main() {
libName := os.Getenv("VIBEVOICECPP_LIBRARY") libName := os.Getenv("VIBEVOICECPP_LIBRARY")
if libName == "" { if libName == "" {
if runtime.GOOS == "darwin" { libName = "./libgovibevoicecpp-fallback.so"
libName = "./libgovibevoicecpp-fallback.dylib"
} else {
libName = "./libgovibevoicecpp-fallback.so"
}
} }
lib, err := purego.Dlopen(libName, purego.RTLD_NOW|purego.RTLD_GLOBAL) lib, err := purego.Dlopen(libName, purego.RTLD_NOW|purego.RTLD_GLOBAL)

View File

@@ -12,8 +12,7 @@ REPO_ROOT="${CURDIR}/../../.."
mkdir -p $CURDIR/package/lib mkdir -p $CURDIR/package/lib
cp -avf $CURDIR/vibevoice-cpp $CURDIR/package/ cp -avf $CURDIR/vibevoice-cpp $CURDIR/package/
cp -fv $CURDIR/libgovibevoicecpp-*.so $CURDIR/package/ 2>/dev/null || true cp -fv $CURDIR/libgovibevoicecpp-*.so $CURDIR/package/
cp -fv $CURDIR/libgovibevoicecpp-*.dylib $CURDIR/package/ 2>/dev/null || true
cp -fv $CURDIR/run.sh $CURDIR/package/ cp -fv $CURDIR/run.sh $CURDIR/package/
# Detect architecture and copy appropriate libraries # Detect architecture and copy appropriate libraries

View File

@@ -11,13 +11,9 @@ if [ "$(uname)" != "Darwin" ]; then
grep -e "flags" /proc/cpuinfo | head -1 grep -e "flags" /proc/cpuinfo | head -1
fi fi
if [ "$(uname)" = "Darwin" ]; then LIBRARY="$CURDIR/libgovibevoicecpp-fallback.so"
# macOS: single dylib variant (Metal or Accelerate)
LIBRARY="$CURDIR/libgovibevoicecpp-fallback.dylib"
export DYLD_LIBRARY_PATH=$CURDIR/lib:$DYLD_LIBRARY_PATH
else
LIBRARY="$CURDIR/libgovibevoicecpp-fallback.so"
if [ "$(uname)" != "Darwin" ]; then
if grep -q -e "\savx\s" /proc/cpuinfo ; then if grep -q -e "\savx\s" /proc/cpuinfo ; then
echo "CPU: AVX found OK" echo "CPU: AVX found OK"
if [ -e $CURDIR/libgovibevoicecpp-avx.so ]; then if [ -e $CURDIR/libgovibevoicecpp-avx.so ]; then
@@ -38,10 +34,9 @@ else
LIBRARY="$CURDIR/libgovibevoicecpp-avx512.so" LIBRARY="$CURDIR/libgovibevoicecpp-avx512.so"
fi fi
fi fi
export LD_LIBRARY_PATH=$CURDIR/lib:$LD_LIBRARY_PATH
fi fi
export LD_LIBRARY_PATH=$CURDIR/lib:$LD_LIBRARY_PATH
export VIBEVOICECPP_LIBRARY=$LIBRARY export VIBEVOICECPP_LIBRARY=$LIBRARY
if [ -f $CURDIR/lib/ld.so ]; then if [ -f $CURDIR/lib/ld.so ]; then

View File

@@ -117,7 +117,6 @@ libgowhisper-custom: CMakeLists.txt cpp/gowhisper.cpp cpp/gowhisper.h
cmake .. $(CMAKE_ARGS) && \ cmake .. $(CMAKE_ARGS) && \
cmake --build . --config Release -j$(JOBS) && \ cmake --build . --config Release -j$(JOBS) && \
cd .. && \ cd .. && \
mv build-$(SO_TARGET)/libgowhisper.so ./$(SO_TARGET) 2>/dev/null || \ mv build-$(SO_TARGET)/libgowhisper.so ./$(SO_TARGET)
mv build-$(SO_TARGET)/libgowhisper.dylib ./$(SO_TARGET:.so=.dylib)
all: whisper package all: whisper package

View File

@@ -4,7 +4,6 @@ package main
import ( import (
"flag" "flag"
"os" "os"
"runtime"
"github.com/ebitengine/purego" "github.com/ebitengine/purego"
grpc "github.com/mudler/LocalAI/pkg/grpc" grpc "github.com/mudler/LocalAI/pkg/grpc"
@@ -23,11 +22,7 @@ func main() {
// Get library name from environment variable, default to fallback // Get library name from environment variable, default to fallback
libName := os.Getenv("WHISPER_LIBRARY") libName := os.Getenv("WHISPER_LIBRARY")
if libName == "" { if libName == "" {
if runtime.GOOS == "darwin" { libName = "./libgowhisper-fallback.so"
libName = "./libgowhisper-fallback.dylib"
} else {
libName = "./libgowhisper-fallback.so"
}
} }
gosd, err := purego.Dlopen(libName, purego.RTLD_NOW|purego.RTLD_GLOBAL) gosd, err := purego.Dlopen(libName, purego.RTLD_NOW|purego.RTLD_GLOBAL)

View File

@@ -12,8 +12,7 @@ REPO_ROOT="${CURDIR}/../../.."
mkdir -p $CURDIR/package/lib mkdir -p $CURDIR/package/lib
cp -avf $CURDIR/whisper $CURDIR/package/ cp -avf $CURDIR/whisper $CURDIR/package/
cp -fv $CURDIR/libgowhisper-*.so $CURDIR/package/ 2>/dev/null || true cp -fv $CURDIR/libgowhisper-*.so $CURDIR/package/
cp -fv $CURDIR/libgowhisper-*.dylib $CURDIR/package/ 2>/dev/null || true
cp -fv $CURDIR/run.sh $CURDIR/package/ cp -fv $CURDIR/run.sh $CURDIR/package/
# Detect architecture and copy appropriate libraries # Detect architecture and copy appropriate libraries

View File

@@ -12,13 +12,9 @@ if [ "$(uname)" != "Darwin" ]; then
grep -e "flags" /proc/cpuinfo | head -1 grep -e "flags" /proc/cpuinfo | head -1
fi fi
if [ "$(uname)" = "Darwin" ]; then LIBRARY="$CURDIR/libgowhisper-fallback.so"
# macOS: single dylib variant (Metal or Accelerate)
LIBRARY="$CURDIR/libgowhisper-fallback.dylib"
export DYLD_LIBRARY_PATH=$CURDIR/lib:$DYLD_LIBRARY_PATH
else
LIBRARY="$CURDIR/libgowhisper-fallback.so"
if [ "$(uname)" != "Darwin" ]; then
if grep -q -e "\savx\s" /proc/cpuinfo ; then if grep -q -e "\savx\s" /proc/cpuinfo ; then
echo "CPU: AVX found OK" echo "CPU: AVX found OK"
if [ -e $CURDIR/libgowhisper-avx.so ]; then if [ -e $CURDIR/libgowhisper-avx.so ]; then
@@ -40,10 +36,9 @@ else
LIBRARY="$CURDIR/libgowhisper-avx512.so" LIBRARY="$CURDIR/libgowhisper-avx512.so"
fi fi
fi fi
export LD_LIBRARY_PATH=$CURDIR/lib:$LD_LIBRARY_PATH
fi fi
export LD_LIBRARY_PATH=$CURDIR/lib:$LD_LIBRARY_PATH
export WHISPER_LIBRARY=$LIBRARY export WHISPER_LIBRARY=$LIBRARY
# If there is a lib/ld.so, use it # If there is a lib/ld.so, use it

View File

@@ -5282,6 +5282,7 @@
nvidia: "cuda12-trl" nvidia: "cuda12-trl"
nvidia-cuda-12: "cuda12-trl" nvidia-cuda-12: "cuda12-trl"
nvidia-cuda-13: "cuda13-trl" nvidia-cuda-13: "cuda13-trl"
metal: "metal-trl"
## TRL backend images ## TRL backend images
- !!merge <<: *trl - !!merge <<: *trl
name: "cpu-trl" name: "cpu-trl"
@@ -5313,6 +5314,16 @@
uri: "quay.io/go-skynet/local-ai-backends:master-gpu-nvidia-cuda-13-trl" uri: "quay.io/go-skynet/local-ai-backends:master-gpu-nvidia-cuda-13-trl"
mirrors: mirrors:
- localai/localai-backends:master-gpu-nvidia-cuda-13-trl - localai/localai-backends:master-gpu-nvidia-cuda-13-trl
- !!merge <<: *trl
name: "metal-trl"
uri: "quay.io/go-skynet/local-ai-backends:latest-metal-darwin-arm64-trl"
mirrors:
- localai/localai-backends:latest-metal-darwin-arm64-trl
- !!merge <<: *trl
name: "metal-trl-development"
uri: "quay.io/go-skynet/local-ai-backends:master-metal-darwin-arm64-trl"
mirrors:
- localai/localai-backends:master-metal-darwin-arm64-trl
## llama.cpp quantization backend ## llama.cpp quantization backend
- &llama-cpp-quantization - &llama-cpp-quantization
name: "llama-cpp-quantization" name: "llama-cpp-quantization"

View File

@@ -8,7 +8,13 @@ else
source $backend_dir/../common/libbackend.sh source $backend_dir/../common/libbackend.sh
fi fi
EXTRA_PIP_INSTALL_FLAGS+=" --upgrade --index-strategy=unsafe-first-match" EXTRA_PIP_INSTALL_FLAGS+=" --upgrade"
# --index-strategy is a uv-only flag. The darwin/MPS build installs with pip
# (USE_PIP=true in scripts/build/python-darwin.sh), which rejects it. Only add
# it when uv is the installer, keeping the Linux/CUDA resolution unchanged.
if [ "x${USE_PIP:-}" != "xtrue" ]; then
EXTRA_PIP_INSTALL_FLAGS+=" --index-strategy=unsafe-first-match"
fi
installRequirements installRequirements
# Fetch convert_hf_to_gguf.py and gguf package from the same llama.cpp version # Fetch convert_hf_to_gguf.py and gguf package from the same llama.cpp version

View File

@@ -0,0 +1,12 @@
torch==2.10.0
trl
peft
datasets>=3.0.0
transformers>=4.56.2
accelerate>=1.4.0
huggingface-hub>=1.3.0
sentencepiece
# Note: bitsandbytes is intentionally omitted on MPS. It is only used by the
# CUDA (cublas) variants for 8-bit/4-bit quantization and has poor support on
# Apple Silicon. torch here uses the plain PyPI wheels, which ship MPS support
# on macOS arm64.

View File

@@ -45,7 +45,7 @@
}, },
"scheduling": { "scheduling": {
"title": "Penjadwalan", "title": "Penjadwalan",
"subtitle": "Aturan penempatan model dan replika di seluruh klaster" "subtitle": "Aturan penempatan model dan replika di seluruh kluster"
}, },
"p2p": { "p2p": {
"title": "Komputasi AI Terdistribusi", "title": "Komputasi AI Terdistribusi",
@@ -86,4 +86,4 @@
"title": "Penjelajah", "title": "Penjelajah",
"subtitle": "Jelajahi file dan konfigurasi" "subtitle": "Jelajahi file dan konfigurasi"
} }
} }

View File

@@ -72,7 +72,7 @@
"actions": { "actions": {
"copy": "Salin", "copy": "Salin",
"regenerate": "Hasilkan ulang", "regenerate": "Hasilkan ulang",
"jumpToLatest": "Jump to latest" "jumpToLatest": "Lompat ke terbaru"
}, },
"streaming": { "streaming": {
"transferring": "Mentransfer model...", "transferring": "Mentransfer model...",
@@ -115,4 +115,4 @@
"clearAll": "Hapus semua", "clearAll": "Hapus semua",
"deleteAllTitle": "Hapus semua percakapan" "deleteAllTitle": "Hapus semua percakapan"
} }
} }

View File

@@ -1,8 +1,8 @@
{ {
"unsaved": { "unsaved": {
"title": "Discard unsaved changes?", "title": "Buang perubahan yang belum disimpan?",
"message": "You have unsaved changes that will be lost if you leave this page.", "message": "Anda memiliki perubahan yang belum disimpan. Perubahan tersebut akan hilang jika Anda meninggalkan halaman ini.",
"leave": "Leave" "leave": "Tinggalkan Halaman"
}, },
"actions": { "actions": {
"save": "Simpan", "save": "Simpan",

View File

@@ -7,15 +7,15 @@
"resourceGpu": "GPU", "resourceGpu": "GPU",
"resourceRam": "RAM", "resourceRam": "RAM",
"greeting": { "greeting": {
"morning": "Good morning", "morning": "Selamat pagi",
"afternoon": "Good afternoon", "afternoon": "Selamat siang",
"evening": "Good evening", "evening": "Selamat malam",
"night": "Working late" "night": "Selamat lembur"
}, },
"statusLine": { "statusLine": {
"modelsLoaded_one": "{{count}} model loaded", "modelsLoaded_one": "{{count}} model dimuat",
"modelsLoaded_other": "{{count}} models loaded", "modelsLoaded_other": "{{count}} model dimuat",
"noModelsLoaded": "No models loaded", "noModelsLoaded": "Tidak ada model yang dimuat",
"nodes_one": "{{count}} node", "nodes_one": "{{count}} node",
"nodes_other": "{{count}} nodes" "nodes_other": "{{count}} nodes"
}, },
@@ -79,14 +79,14 @@
}, },
"connect": { "connect": {
"title": "Satu endpoint, semua API", "title": "Satu endpoint, semua API",
"subtitle": "LocalAI menyediakan API miliknya sendiri yang lengkap — pembuatan gambar & video, depth, deteksi objek, reranking, audio, pengenalan wajah & suara, serta suara realtime melalui WebRTC dan WebSocket. Di atas itu, lapisan kompatibilitas drop-in membuat aplikasi apa pun yang dibuat untuk OpenAI, Anthropic, Ollama, atau OpenAI Responses bekerja tanpa perubahan.", "subtitle": "LocalAI menyediakan API miliknya sendiri yang lengkap — pembuatan gambar & video, depth, deteksi objek, reranking, audio, pengenalan wajah & suara, serta suara realtime melalui WebRTC dan WebSocket. Selain itu, lapisan kompatibilitas drop-in membuat aplikasi apa pun yang dibuat untuk OpenAI, Anthropic, Ollama, atau OpenAI Responses bekerja tanpa perubahan.",
"nativeTitle": "API native", "nativeTitle": "API native",
"compatTitle": "Kompatibilitas drop-in", "compatTitle": "Kompatibilitas drop-in",
"apiReference": "Referensi API lengkap", "apiReference": "Referensi API lengkap",
"copy": "Salin", "copy": "Salin",
"copied": "Disalin", "copied": "Disalin",
"browse": "Browse the API", "browse": "Jelajahi API",
"hide": "Hide endpoints", "hide": "Sembunyikan endpoint",
"dismiss": "Dismiss" "dismiss": "Abaikan"
} }
} }

View File

@@ -5,7 +5,7 @@
"video": "Video", "video": "Video",
"tts": "TTS", "tts": "TTS",
"sound": "Suara", "sound": "Suara",
"transform": "Transform" "transform": "Transformasi"
} }
}, },
"image": { "image": {
@@ -30,7 +30,7 @@
"refImagesAdded_other": "{{count}} gambar ditambahkan" "refImagesAdded_other": "{{count}} gambar ditambahkan"
}, },
"actions": { "actions": {
"view": "View", "view": "Lihat",
"generate": "Hasilkan", "generate": "Hasilkan",
"generating": "Menghasilkan..." "generating": "Menghasilkan..."
}, },
@@ -153,4 +153,4 @@
"clearConfirm": "Hapus", "clearConfirm": "Hapus",
"cleared": "Riwayat dihapus" "cleared": "Riwayat dihapus"
} }
} }

View File

@@ -19,11 +19,11 @@
"operate": "Operasikan" "operate": "Operasikan"
}, },
"operate": { "operate": {
"inference": "Inference", "inference": "Inferensi",
"cluster": "Cluster", "cluster": "Kluster",
"observability": "Observability", "observability": "Observabilitas",
"access": "Access", "access": "Akses",
"system": "System" "system": "Sistem"
}, },
"items": { "items": {
"home": "Beranda", "home": "Beranda",
@@ -64,7 +64,7 @@
"copyright": "© 2023-{{year}} {{author}}" "copyright": "© 2023-{{year}} {{author}}"
}, },
"console": { "console": {
"automation": "Otomasi", "automation": "Automasi",
"training": "Pelatihan" "training": "Pelatihan"
} }
} }