Closed tsilvs closed 1 month ago
Ollama doesn't weight 10MiB, it weights almost 300MiB
Yeah, sorry, I looked at .rpm
installer package, not the runner
@Jeffser wait! Found it!
There is an OpenSUSE RPM of Ollama (in "Factory" builds repo).
Maintained by dimstar @DimStar77
And the /usr/bin/ollama
binary in it weights only 30 MiBs!
Will test it later on OpenSUSE MicroOS VM or distrobox. Have to find out if it downloads anything additional, or is it really that small. Probably some kind of good dependency optimisation / treeshaking build flag?
it is probably an installer for Ollama, not Ollama itself, you see, I need the actual binary so I can sandbox it in Flatpak, using the install scripts from Ollama might work, but it's more work and at the end of the day of the day it ends up weighing the same
On Arch Linux, ollama weighs 54mb after unpacking and it is not an installer but a binary.
The difference in weight results from the fact that in Linux official repositories, ollama uses dynamic linking libraries that are already included in a given system.
Ollama directly from https://github.com/ollama/ollama/releases has a bundle of all libraries to make it compatible with various Linux systems and independent.
Makes sense, I still won't change it, if the user is able to download models they can download a 300mb binary, I'm not sure how Flatpak interacts with system libraries and stuff like that, there are some binaries that are included with every flatpak but they are very basic
As for me, it's cool @Jeffser, it's your decision as a maintainer and we have nothing to do with it.
I just mentioned it as an interesting fact for the thread.
Besides, if someone wants to use the app, it won't bother him whether it's flatpak or something else. And even if it bothers someone, there is nothing stopping them from compiling the app on their own computer.
The PKGBUILD I sent you creates a binary of 0.39MB instead of 300MB and that's it. With native compilation, it seems that ollama is not bundled anyway. And with native compilation only the "external instance" of ollama works.
@Jeffser @oritwoen
ollama
0.1.38
.rpm
from OpenSUSE repo (more links @pkgs.org
) lists these dependencies:
/bin/sh
user(ollama)
& group(ollama)
(probably meaning that system should have user ollama:ollama
)sysuser-shadow
>= 3.2
libc.so.6
from GLIBC
64bit
>= 2.2.5
& <= 2.38
libm.so.6
from GLIBC
64bit
>= 2.2.5
& <= 2.29
(which limits glibc
to be between versions 2.2.5
& 2.29
)libgcc_s.so.1
from GCC
64bit
=3.0
libstdc++.so.6
either from:
CXXABI
64bit
>= 1.3
& <= 1.3.13
GLIBCXX
64bit
>= 3.4
& <= 3.4.29
As mentioned in dependency management guide, flatpaks can access their own shared dependencies installed as runtimes. If I understood it correctly, Freedesktop
, GNOME
& KDE
runtimes should already contain necessary glibc
, gcc
& cxxabi
shared objects.
Isn't that too big for a text processing app?
Ollama weights ~10 MiB.