fix: made the macos app smaller
This commit is contained in:
18
mix.exs
18
mix.exs
@@ -62,11 +62,21 @@ defmodule BDS.MixProject do
|
||||
{:ex_ratatui, "~> 0.11"},
|
||||
{:image, "~> 0.67"},
|
||||
{:nx, "~> 0.10"},
|
||||
{:exla, "~> 0.10"},
|
||||
# Only one ML inference backend ships per platform; NIF releases are
|
||||
# host-built, so the build OS is the target OS. EXLA (283 MB XLA CPU
|
||||
# payload) never runs in the macOS app — EMLX always wins on Apple
|
||||
# Silicon — but `runtime: false` alone can't exclude it there because
|
||||
# the `image` dep declares exla as an optional application, which drags
|
||||
# it into the release whenever it exists in the prod dep tree. Scoping
|
||||
# it to dev/test on macOS keeps it fully out of macOS releases while
|
||||
# Linux/Windows ship it as their production inference backend.
|
||||
{:exla, "~> 0.10", if(macos?(), do: [only: [:dev, :test]], else: [])},
|
||||
# Apple Silicon GPU (Metal) acceleration for embedding inference. Ships
|
||||
# precompiled MLX binaries; the Neural backend prefers it on arm64 macOS
|
||||
# and falls back to EXLA-CPU elsewhere (SPECGAPS A1-14c).
|
||||
{:emlx, "~> 0.2.0"},
|
||||
# and falls back to EXLA-CPU elsewhere (SPECGAPS A1-14c). Apple-only, so
|
||||
# non-macOS releases exclude it (runtime: false deps stay out of
|
||||
# releases — nothing pulls emlx in optionally, unlike exla above).
|
||||
{:emlx, "~> 0.2.0", runtime: macos?()},
|
||||
{:bumblebee, "~> 0.6.3"},
|
||||
{:hnswlib, "~> 0.1.7"},
|
||||
{:stemex, "~> 0.2.1"},
|
||||
@@ -121,4 +131,6 @@ defmodule BDS.MixProject do
|
||||
]
|
||||
]
|
||||
end
|
||||
|
||||
defp macos?, do: :os.type() == {:unix, :darwin}
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user