BodhiSearch / BodhiApp

Run Open Source/Open Weight LLMs locally with OpenAI compatible APIs
65 stars 2 forks source link

`brew` / Homebrew installs the `arm64` variant of BodhiApp by default on MacOS even on `amd64` machines #1

Closed karuppiah7890 closed 4 months ago

karuppiah7890 commented 4 months ago

Logs :

~ $ brew tap BodhiSearch/apps
==> Auto-updating Homebrew...
Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with
HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> Auto-updated Homebrew!
Updated 2 taps (hashicorp/tap and homebrew/core).
==> New Formulae
awsdac                                     llgo                                       testscript

You have 45 outdated formulae installed.

==> Tapping bodhisearch/apps
Cloning into '/usr/local/Homebrew/Library/Taps/bodhisearch/homebrew-apps'...
remote: Enumerating objects: 139, done.
remote: Counting objects: 100% (139/139), done.
remote: Compressing objects: 100% (80/80), done.
remote: Total 139 (delta 51), reused 122 (delta 34), pack-reused 0
Receiving objects: 100% (139/139), 15.55 KiB | 1.94 MiB/s, done.
Resolving deltas: 100% (51/51), done.
Tapped 1 cask (14 files, 25KB).

~ $ brew install --cask bodhi
==> Downloading https://github.com/BodhiSearch/BodhiApp/releases/download/v0.0.10/Bodhi_0.0.10_aarch64.dmg
==> Downloading from https://objects.githubusercontent.com/github-production-release-asset-2e65be/765037941/29f71890-df53-48b0-
######################################################################################################################## 100.0%
==> Installing Cask bodhi
==> Moving App 'Bodhi.app' to '/Applications/Bodhi.app'
==> Linking Binary 'bodhi' to '/usr/local/bin/bodhi'
🍺  bodhi was successfully installed!

~ $ bodhi
/usr/local/bin/bodhi: line 9: /Applications/Bodhi.app/Contents/MacOS/Bodhi: Bad CPU type in executable

~ $ file /usr/local/bin/bodhi 
/usr/local/bin/bodhi: Bourne-Again shell script text executable, ASCII text

~ $ cat /usr/local/bin/bodhi 
#!/bin/bash
if [ $# -eq 0 ]; then
  args="--help"
else
  args="$@"
fi
current_dir=$(dirname "$(realpath "$0")")
bodhi_bin=$(realpath $current_dir/../../../MacOS/bodhi)
$bodhi_bin $args

~ $ file /Applications/Bodhi.app/Contents/MacOS/Bodhi
/Applications/Bodhi.app/Contents/MacOS/Bodhi: Mach-O 64-bit executable arm64
Screenshot 2024-06-26 at 12 58 55 PM

Of course the same happens when the BodhiApp MacOS Application is opened from the Applications directory, saying the error -

You can’t open the application “Bodhi” because this application is not supported on this Mac.
Screenshot 2024-06-26 at 12 57 27 PM
anagri commented 4 months ago

Thanx @karuppiah7890

Quite detailed bug report. The older Macs don't have a neural engine. And running LLMs on CPU will be very slow.

I will add this in pipeline when we are planning to release for older Macs. For time being I'll explore how to not have brew install for x64 and give a friendly warning message.

Thanx again for the detailed bug report.

anagri commented 4 months ago

Closed by mistake, keeping it open

karuppiah7890 commented 4 months ago

Awesome 💯✅✔️☑️💪🔥🫡😸😺🤠🙏

On Thu, 27 Jun 2024, 15:58 Amiruddin Nagri, @.***> wrote:

Closed #1 https://github.com/BodhiSearch/BodhiApp/issues/1 as completed via @.*** https://github.com/BodhiSearch/homebrew-apps/commit/d2f739ed54ec84013ca3a5c1ff5935e7fc0265e8 .

— Reply to this email directly, view it on GitHub https://github.com/BodhiSearch/BodhiApp/issues/1#event-13315029165, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADBXB2GG52MC4Q2TC2WPIY3ZJPSM7AVCNFSM6AAAAABJ5I6XKKVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJTGMYTKMBSHEYTMNI . You are receiving this because you were mentioned.Message ID: @.***>