mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-12 01:54:38 -05:00
Slim down docker image #158
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Joly0 on GitHub (Jan 7, 2024).
Hey, this is not really a bug report, though it would be great, if the docker image could somehow be slimmed down. Currently the image downloaded is about 9GB in size. Most of it (about 5GB) comes from this command in the image:
pip3 install -r requirements.txtIts quite annoying to download this much everytime there is an update of ollama-webui, especially if the updates basically come in daily. For a slower internet connection this is a pain.
Thanks and have a great day
@tjbck commented on GitHub (Jan 7, 2024):
Hi, Thanks for creating this issue! Testing out with slim-bookworm at the moment, and will be merged to main soon if there aren't any issues, stay tuned!
@tjbck commented on GitHub (Jan 7, 2024):
We'll try to slim down some more, but if the requirements.txt is the root cause, There aren't many ways to further slim down I'm afraid. If you manage to find a way, feel free to make a PR, Thanks!
@Joly0 commented on GitHub (Jan 8, 2024):
@tjbck I tried a few things i had up my sleeve but none of that really worked. I will try a few different things aswell later, but i am afraid you are right. The biggest problems are some nvidia packages, which are really large in size, though i am not sure if those are really needed by this project? I thought this is more or less only a webui for ollama and therefore those things shouldnt be needed or what am i missing?
@tjbck commented on GitHub (Jan 8, 2024):
I think they've been included because of torch python dependency (required for RAG, vector DB), I'll take a look and see if installing cpu only version reduces the size of the image, stay tuned!
@tjbck commented on GitHub (Jan 8, 2024):
@Joly0 #422 should reduce the size of the image quite a bit, removes all the nvidia dependencies for torch.
@Joly0 commented on GitHub (Jan 8, 2024):
Really cool, thanks for your work. I'll try it out and give feedback asap.
@Joly0 commented on GitHub (Jan 12, 2024):
So btw, i have tested this and it is substantially smaller in size. It would be great, if the image wouldnt need to be redone everytime something changes in this repo, but thats nott hat big of an issue. Though i thought, what if there was some logic to download the newest release automatic on container startup, rather than bundling it all directly in the image. So we had a base image with all the dependencies and the actual software would be downloaded on runtime
@djismgaming commented on GitHub (Apr 25, 2024):
My only though would be that it would make the image not able to be used in completely offline (air gapped) systems.
@justinh-rahb commented on GitHub (Apr 25, 2024):
Not to mention that was our original default behaviour and several people filed issues until we "fixed" it. That would be regression from their perspective. The default models impact on image size is minimal.