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

macOS build #7

Merged
merged 1 commit into from
Jul 28, 2024
Merged

macOS build #7

merged 1 commit into from
Jul 28, 2024

Conversation

ericcurtin
Copy link
Collaborator

To ensure things work on macOS.

@ericcurtin ericcurtin self-assigned this Jul 27, 2024
install.sh Outdated
elif available nvidia-smi; then
nvidia_available="true"
fi
# gpu_check() {
Copy link
Member

Choose a reason for hiding this comment

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

Why are you commenting this out?

Copy link
Collaborator Author

@ericcurtin ericcurtin Jul 28, 2024

Choose a reason for hiding this comment

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

I never completed the GPU checking stuff... Trying to get the design correct first before bringing on the maintenance of all the GPU backends, testing matrix can get big fast.

And because I started running shellcheck on everything, shellcheck was identifying this stuff as unused shell scripts (correctly)... Commenting this out makes the builds green

Maybe I should just delete this stuff...

Copy link
Member

Choose a reason for hiding this comment

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

I am fine with commenting it out.

install.sh Outdated
# gpu_check() {
# if available lspci && lspci -d '10de:' | grep -q 'NVIDIA'; then
# nvidia_available="true"
# elif available lshw && nvidia_lshw; then
Copy link
Member

Choose a reason for hiding this comment

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

This line looks wrong.

Shouldn't this be
if available nvidia_lshw && nvidia_lshw; then?

Copy link
Collaborator Author

@ericcurtin ericcurtin Jul 28, 2024

Choose a reason for hiding this comment

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

nvidia_lshw is a bash function a couple of lines up

lshw is a binary required to query for GPU type (there's other ways of querying GPU type, it's one of the ways of doing it rootless), not always installed.

We know nvidia_lshw is available, it's declared in this function.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks.

install.sh Outdated
}
# if available lspci && lspci -d '1002:' | grep -q 'AMD'; then
# amd_available="true"
# elif available lshw && amd_lshw; then
Copy link
Member

Choose a reason for hiding this comment

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

Ditto
if available amd_lshw && amd_lshw; then?

To ensure things work on macOS.

Signed-off-by: Eric Curtin <[email protected]>
@ericcurtin
Copy link
Collaborator Author

ericcurtin commented Jul 28, 2024

Deleting commented out lines for now.

When we get around to enhancing this more below are some decent reference scripts, we may have to write in a portable POSIX-like manner to be compatible with bash for Linux and zsh for macOS.

Eventually we will have to rpm package properly, but it's really not straightforward for these AI/LLM tools, optional dependencies based on hardware, instable APIs that need to be changed regularly. The AI world is kinda young also, so we really want to be up-to date with things like llama.cpp upstream to be compatible with the latest LLMs like Granite Code, Llama 3 as examples.

https://github.com/mudler/LocalAI/blob/master/docs/static/install.sh
https://github.com/ollama/ollama/blob/main/scripts/install.sh
https://github.com/ericcurtin/podman-ollama/blob/main/ollama-install.sh
https://github.com/ericcurtin/podman-ollama/blob/main/install.sh

@rhatdan
Copy link
Member

rhatdan commented Jul 28, 2024

LGTM

@rhatdan rhatdan merged commit 3be60ba into main Jul 28, 2024
5 checks passed
@ericcurtin ericcurtin deleted the mac branch July 28, 2024 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants