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

feat: Add a ujust action to install ollama quadlet #1072

Merged
merged 3 commits into from
Apr 7, 2024

Conversation

anoldguy
Copy link
Contributor

Running ujust ollama should:

  1. Interrogate the machine's hardware, looking for nvidia (which nvidia-smi under the assumption that if you have the drivers installed, you likely have nvidia hardware...) and amd (lspci | grep ' VGA ' | grep -sq Radeon).
  2. If multiple are found, present the user with a choice of Nvidia (CUDA) or AMD (ROCm).
  3. Create a quadlet at ~/.config/containers/systemd/ollama.container with the appropriate bits set for the choice detected or selected by the user.
  4. Prompt the user to install the ollama cli via brew install ollama.

I'm unsure about 2 things, and would appreciate some feedback.

  1. Templating the quadlet like this feels...hacky. It works, but we've got a whole HEREDOC in the Justfile. 🥴
  2. Should we automatically install the ollama cli via brew for the user? I'm leaning like we should, but they might not have brew installed.

I've tested the Justfile in isolation, but not as a part of the main build. I don't have my fork setup for automatic builds yet. 😬

@anoldguy anoldguy requested a review from castrojo as a code owner March 30, 2024 00:10
castrojo
castrojo previously approved these changes Mar 30, 2024
@castrojo
Copy link
Member

Yeah we could just include the file somewhere on disk and copy it over, it's only a few bytes.

Let's punt on the magic ollama installation, maybe we can echo "make sure you set up brew first and install ollama" or something.

@anoldguy
Copy link
Contributor Author

Let's punt on the magic ollama installation, maybe we can echo "make sure you set up brew first and install ollama" or something.

More than this?.

@castrojo
Copy link
Member

Ah yes, that'll work. 😄

Ok, I'm fine with this and ready to +1! Would like a quick review from someone else on the quadlet tho.

p5
p5 previously approved these changes Apr 7, 2024
Copy link
Member

@p5 p5 left a comment

Choose a reason for hiding this comment

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

LGTM! Nice one!

@p5 p5 dismissed stale reviews from castrojo and themself via 39f44f3 April 7, 2024 21:54
p5
p5 previously approved these changes Apr 7, 2024
Copy link
Member

@p5 p5 left a comment

Choose a reason for hiding this comment

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

Re-approving after resolved the merge conflict

Copy link
Member

@p5 p5 left a comment

Choose a reason for hiding this comment

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

Approving again after fixing Justfile syntax

@p5 p5 requested a review from castrojo April 7, 2024 22:05
@castrojo castrojo merged commit bb2bcac into ublue-os:main Apr 7, 2024
23 of 59 checks passed
wizzywizard65 pushed a commit to wizzywizard65/bluefin that referenced this pull request Apr 8, 2024
@anoldguy anoldguy deleted the ollama-quadlet branch April 8, 2024 11:48
awesomekyle pushed a commit to awesomekyle/bluefin that referenced this pull request Apr 24, 2024
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.

3 participants