mirror of
https://github.com/mudler/LocalAI.git
synced 2026-10-05 12:34:43 -04:00
Return before initializing Linux library helpers on macOS. The system Bash lacks associative arrays, and Metal uses system frameworks. Assisted-by: Codex:gpt-6 Co-authored-by: localai-org-maint-bot <306269227+localai-org-maint-bot@users.noreply.github.com>
20 lines
563 B
Bash
20 lines
563 B
Bash
#!/bin/bash
|
|
# Darwin uses system GPU frameworks and ships Bash 3.2 without associative arrays.
|
|
set -euo pipefail
|
|
SCRIPT="$(dirname "$(realpath "$0")")/package-gpu-libs.sh"
|
|
WORK=$(mktemp -d)
|
|
trap 'rm -rf "$WORK"' EXIT
|
|
uname() { echo Darwin; }
|
|
declare() {
|
|
if [[ "${1:-}" == -A ]]; then
|
|
echo 'Bash 3.2 does not support declare -A' >&2
|
|
return 2
|
|
fi
|
|
builtin declare "$@"
|
|
}
|
|
export BUILD_TYPE=metal
|
|
source "$SCRIPT" "$WORK/lib"
|
|
package_gpu_libs
|
|
test -z "$(find "$WORK" -type f -print)"
|
|
echo 'PASS: Darwin does not load the Linux GPU packager'
|