Commit a24f7e1
committed
fix(ollama): self-install upstream binary when no rpm exists
The previous 37-ollama-prep.sh bailed early on every CI build because
its 'command -v ollama' check assumed ollama was installed via
packages-ai -- but ollama is NOT a Fedora RPM. Visible symptom: the
build duration only grew ~36 seconds when 37-ollama-prep.sh re-entered
the main pipeline, instead of the multi-minute pull a real
qwen2.5-coder:7b download would take. The image shipped with no
build-baked models.
Fix: when 'command -v ollama' returns nothing, fetch the official
upstream tarball from github.com/ollama/ollama/releases/latest, pick
the right -amd64 / -arm64 asset by uname -m, extract the ELF, and
install it to /usr/bin/ollama (immutable composefs surface, FHS-
canonical for system binaries). Try .tgz first, fall back to .tar.zst
if upstream changes asset format. All failures fall through to
'skipping bake' rather than failing the build, so a transient network
issue doesn't block the rest of the pipeline.
PACKAGES.md gets a comment in the packages-ai block documenting why
ollama isn't listed there (no Fedora RPM upstream) and pointing at
the runtime path (docker.io/ollama/ollama image used by the
mios-ollama Quadlet).
After this lands, the build duration should grow by the time it
takes to pull the configured bake set
(MIOS_OLLAMA_BAKE_MODELS, default qwen2.5-coder:7b + nomic-embed-text
~5 GB). The seed lands at /usr/share/ollama/models on the immutable
surface, then mios-ollama-firstboot.service hardlink-copies it into
/var/lib/ollama/models on first deploy.1 parent c27442c commit a24f7e1
2 files changed
Lines changed: 52 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
48 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
49 | 52 | | |
50 | | - | |
51 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
52 | 89 | | |
53 | 90 | | |
54 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
722 | 722 | | |
723 | 723 | | |
724 | 724 | | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
725 | 735 | | |
726 | 736 | | |
727 | 737 | | |
| |||
0 commit comments