Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

localai 2.18.1 (new formula) #172734

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mauromorales
Copy link
Contributor

Adds formula for LocalAI https://localai.io/

  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

@github-actions github-actions bot added autosquash Automatically squash pull request commits according to Homebrew style. go Go use is a significant feature of the PR or issue python Python use is a significant feature of the PR or issue new formula PR adds a new formula to Homebrew/homebrew-core labels May 24, 2024
@mauromorales mauromorales force-pushed the add-localai branch 2 times, most recently from 9b5e255 to 20c5685 Compare May 24, 2024 13:35
@github-actions github-actions bot removed the autosquash Automatically squash pull request commits according to Homebrew style. label May 24, 2024
Formula/l/localai.rb Outdated Show resolved Hide resolved
Formula/l/localai.rb Outdated Show resolved Hide resolved
@github-actions github-actions bot added the autosquash Automatically squash pull request commits according to Homebrew style. label May 24, 2024
@carlocab carlocab added the CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. label May 24, 2024
@github-actions github-actions bot removed the autosquash Automatically squash pull request commits according to Homebrew style. label May 27, 2024
Formula/l/localai.rb Outdated Show resolved Hide resolved
@github-actions github-actions bot added the autosquash Automatically squash pull request commits according to Homebrew style. label May 27, 2024
Formula/l/localai.rb Outdated Show resolved Hide resolved
@chenrui333
Copy link
Member

still some test failure

  ==> curl -s -i 127.0.0.1:49482
  
  Killing child processes...
  Error: localai: failed
  Error: localai: failed
  An exception occurred within a child process:
    Minitest::Assertion: Expected: 0
    Actual: 7

@chenrui333 chenrui333 added the test failure CI fails while running the test-do block label May 30, 2024
@prabirshrestha
Copy link

prabirshrestha commented May 30, 2024

Would be great if the package was update to use 2.16.0 as it supports new features such as function calling and also a single binary release so doesn't require compilation. Though I added to explicitly run brew install abseil grpc for the text generation models to work. Ideally those 2 packages should probably be statically linked in LocalAI.

@SMillerDev
Copy link
Member

Ideally those 2 packages should probably be statically linked in LocalAI.

Nothing should be statically linked in Homebrew formulae.

@mauromorales
Copy link
Contributor Author

@chenrui333 I don't really have such systems (macos 14 x86_64) to debug, I find it interesting that it works on macos 12 with the same arch, do you think it's a matter of increasing the delay a bit more? Or worst case scenario, can I say it's just arm64 available, since it's the only OS I myself can test?

@mauromorales
Copy link
Contributor Author

@prabirshrestha I'd rather have this merged first than introducing even more changes, as soon as it is merged we will get a version bump and we can see if there's much needed to change or if it works as is.

But maybe version 2.16 passes the tests and then it's worth doing already 🤷

@mauromorales mauromorales force-pushed the add-localai branch 3 times, most recently from 39d781b to 52e7583 Compare June 12, 2024 18:49
@github-actions github-actions bot removed the python Python use is a significant feature of the PR or issue label Jul 3, 2024
@mauromorales mauromorales changed the title LocalAI 2.15.0 (new formula) LocalAI (new formula) Jul 3, 2024
@mauromorales
Copy link
Contributor Author

@carlocab do you know why I encounter this issue on the runners but not on local?

CMake Error at /opt/homebrew/Cellar/cmake/3.30.0/share/cmake/Modules/CMakeDetermineCompilerABI.cmake:129 (message):
    The CXX compiler targets architectures:
  
      "arm64"
  
    but CMAKE_OSX_ARCHITECTURES is
  
      "arm64;x86_64"

This introduces the formula for LocalAI https://localai.io/ the free, Open
Source OpenAI alternative. Self-hosted, community-driven and local-first
@github-actions github-actions bot removed the autosquash Automatically squash pull request commits according to Homebrew style. label Jul 5, 2024
@mauromorales
Copy link
Contributor Author

Couldn't figure out where the issue comes from, but thankfully it was possible to remove one of the backends in LocalAI and this made it work.

@mauromorales
Copy link
Contributor Author

@chenrui333 tests are green now

@mauromorales
Copy link
Contributor Author

@SMillerDev would you have some time to review this?

@chenrui333 chenrui333 changed the title LocalAI (new formula) localai 2.18.1 (new formula) Jul 9, 2024
Comment on lines +34 to +35
# We exclude gpt4all backend because it is causing an issue between
# CMAKE_OSX_ARCHITECTURES and the CXX compiler targets architectures. Check
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we have issue tracking this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chenrui333 issue in which project you mean?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess whatever project that we can followup on this :) I was thinking localai

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not an issue of LocalAI itself, the gpt4all backend can only be built one arch at a time, so passing the multi-arch will always break. I don't think this should block this PR from being merged though. I'm already working for a cleaner way to exclude backends in LocalAI, which I can use once the next release is out, but it would be very helpful if we could have the formula already merged

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But why does it need to pass multiarch? Brew also only builds everything for a single arch at a time.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SMillerDev good question, I'm not sure why the runner has CMAKE_OSX_ARCHITECTURES set to "arm64;x86_64" which is why this error pops up

CMake Error at /opt/homebrew/Cellar/cmake/3.30.0/share/cmake/Modules/CMakeDetermineCompilerABI.cmake:129 (message):
    The CXX compiler targets architectures:
  
      "arm64"
  
    but CMAKE_OSX_ARCHITECTURES is
  
      "arm64;x86_64"

sorry not a macOS expert here, so cannot really tell if this is expected in general or just on the runners

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried in different ways to set CMAKE_OSX_ARCHITECTURES just the currently running arch, but that didn't work. I think that is related to how the shell out in ruby does the passing of the environment variables

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not supposed to be an environment variable, how about setting -DCMAKE_OSX_ARCHITECTURES=#{Hardware::CPU.arch} as a CMake arg?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mauromorales can we try out the cmake arg route?

@mauromorales
Copy link
Contributor Author

@carlocab @chenrui333 @SMillerDev tests are now passing, would it be possible to remove the "test failure" tag?

@chenrui333 chenrui333 removed test failure CI fails while running the test-do block CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. labels Jul 26, 2024
@AyushyaChitransh
Copy link

Is there anything pending on this formula? I would love to help on this to take this to completion.

Copy link
Member

@carlocab carlocab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting on response to #172734 (comment)

Copy link
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label Aug 28, 2024
@AyushyaChitransh
Copy link

Hello @carloca @chenrui333 @SMillerDev

The tests are passing for this PR. Awaiting for you inputs.

@github-actions github-actions bot removed the stale No recent activity label Aug 29, 2024
@SMillerDev
Copy link
Member

See #172734 (review)

@prabirshrestha
Copy link

Seems like gpt4all backend is getting deprecated in LocalAI so probably that comment should be removed instead.

https://github.com/mudler/LocalAI/releases/tag/v2.20.1
image

Copy link
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label Sep 19, 2024
@chenrui333
Copy link
Member

trying to build the latest 2.20.1 release, but seeing some of the following build errors:

backend.protobackend.protobackend.proto::11backend.proto:10:: 1Unrecognized syntax identifier "proto3".  This parser only recognizes "proto2".::1
:1010: Unrecognized syntax identifier "proto3".  This parser only recognizes "proto2".:
Unrecognized syntax identifier "proto3".  This parser only recognizes "proto2".:
10: Unrecognized syntax identifier "proto3".  This parser only recognizes "proto2".

@github-actions github-actions bot removed the stale No recent activity label Sep 22, 2024
@chenrui333
Copy link
Member

Seems like gpt4all backend is getting deprecated in LocalAI so probably that comment should be removed instead.

https://github.com/mudler/LocalAI/releases/tag/v2.20.1 image

@chenrui333 chenrui333 added the in progress Stale bot should stay away label Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Go use is a significant feature of the PR or issue in progress Stale bot should stay away new formula PR adds a new formula to Homebrew/homebrew-core python Python use is a significant feature of the PR or issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants