@mistersmee Maybe you could add a pacman hook for python, triggering a rebuild of the venv on update?
Search Criteria
Package Details: open-webui 0.5.4-1
Package Actions
Git Clone URL: | https://aur.archlinux.org/open-webui.git (read-only, click to copy) |
---|---|
Package Base: | open-webui |
Description: | Web UI and OpenAI API for various LLM runners, including Ollama |
Upstream URL: | https://github.com/open-webui/open-webui |
Licenses: | MIT |
Conflicts: | open-webui-git |
Submitter: | mistersmee |
Maintainer: | mistersmee |
Last Packager: | mistersmee |
Votes: | 5 |
Popularity: | 3.68 |
First Submitted: | 2024-10-09 08:08 (UTC) |
Last Updated: | 2025-01-05 16:38 (UTC) |
Dependencies (5)
- python312AUR
- npm (corepackerAUR, python-nodejs-wheelAUR) (make)
- nvmAUR (nvm-gitAUR) (make)
- ollama (ollama-rocm-gitAUR, ollama-gitAUR, ollama-cuda-gitAUR, ollama-nogpu-gitAUR) (optional)
- tika-serverAUR (optional)
Required by (0)
Sources (3)
30p87 commented on 2024-12-24 16:40 (UTC)
mistersmee commented on 2024-12-24 16:27 (UTC) (edited on 2024-12-26 07:20 (UTC) by mistersmee)
Note to all existing users (those who will be upgrading the package, not installing it anew, people installing anew should be fine):
When major Python versions switch (as just happened with Python 3.12 -> 3.13), I believe it would be prudent to delete the virtual environment created by the backend, done so manually by doing a sudo rm -r /opt/open-webui/backend/venv
, and then reinstalling the open-webui package, thus rebuilding the virtual environment with the new Python major version.
Just reinstalling the open-webui package without removing or uninstalling makes sure that your user data, that is used in openwebui, for e.g., your admin password, remains as it is.
As an addendum, this might be applicable when the python package itself is changed due to dependency mismatches (again, as just happened when I changed the dependency from python
to python312
, and would happen again once python 3.13 is supported upstream back to python
from python312
), I'm not so sure about this, so testing might be needed, but just to be safe, please do so as well.
This is so that any mismatches between the Python version that created the virtualenv and the Python version in use, and any problems that might arise from that, can be avoided.
mistersmee commented on 2024-12-24 16:20 (UTC)
@30p87, Python 3.12 has been confirmed to be working perfectly fine not only here on Arch by me and others, but upstream as well.
And once the pinned dependencies upstream get bumped up by the dependabot bot, hopefully after the dependencies themselves get updated with support for Python 3.13, and once upstream tags a new release, Python 3.13 will be supported as well, I'll test once that happens and update as such.
But yes, as of now, Python 3.13 support currently isn't present, so we're sticking to Python 3.12 for now.
30p87 commented on 2024-12-17 22:56 (UTC)
The Github package explicitly recommends python311, and this would solve problems of some packages/libraries being deprecated in 3.12, but still working, but not existing at all for 3.13, which is the current -testing version. So the package uses a not-recommended python version right now, which deprecates dependencies, and the package is non installable/runnable with python > 3.12, so testing.
Changing the dependencies in the PKGBUILD from just python to python311, and explicitly using python3.11 instead of just python in the .install fixes everything I observed.
envolution commented on 2024-11-25 08:17 (UTC)
@mistersmee awesome, thanks mate
mistersmee commented on 2024-11-24 18:55 (UTC)
@envolution, after trying and testing stuff, I've gone with the second approach you suggested, as while what I said about it not building with the latest nodejs
version is true, it doesn't actually require nodejs
to run at all, so I'm dropping it entirely from the dependencies.
mistersmee commented on 2024-11-24 09:47 (UTC) (edited on 2024-11-24 09:57 (UTC) by mistersmee)
@envolution, the package simply doesn't build or run with just nodejs
as dependency, upstream has nodejs
pinned to 18.13.0 <= nodejs <= 22.x.x
, and nodejs
is at 23.x.x in the repos. It's not a case of reminding users that a certain version of node is supported, it's moving around the versions of node that aren't supported.
envolution commented on 2024-11-24 08:55 (UTC)
please set node dependency to node rather than nodejs-lts-iron - it's fine to remind users that a certain version of node is supported, but you should assume users have various ways of managing node versions themselves
you could also
PKGBUILD
_ensure_local_nvm() {
export NVM_DIR="${srcdir}/.nvm"
source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
nvm install
nvm use
echo "in _ensure nvm dir = ${NVM_DIR}"
}
echo "lts/iron" > .nvmrc
_ensure_local_nvm
...build steps...
but i think open-webui probably wouldn't need this enforecment
mistersmee commented on 2024-11-22 15:42 (UTC) (edited on 2024-11-22 15:42 (UTC) by mistersmee)
@dbb, done, permissions on data
directory set to 700
, with pkgrel 0.4.3-2
Pinned Comments
mistersmee commented on 2025-01-05 15:52 (UTC)
Due to failing build dependencies, the rework has been reverted, as of 0.5.3-3. As suggested by @Davidyz, I've created a separate package,
open-webui-no-venv
, that uses the reworked PKGBUILD.mistersmee commented on 2025-01-03 11:45 (UTC)
PSA everyone, I intend to rework major parts of the PKGBUILD and the way open-webui is installed on the system so that we can get rid of the virtualenv and the long time it takes to build on every install. Also, it should make it so that you don't need to do the things that I mentioned in the first pinned note.
I've tested the changes on my end, and you don't need to do anything when updating from the old way to the new way, it should work just fine as it is, but still, this is a major change. I'll be moving installing the python dependencies from inside a virtualenv to installing the python dependencies system-wide.
If there are any bugs after the rework, which will be updated as 0.5.3-2 pkgrel bump, which are related to open-webui itself, rather than it's dependencies, please add a comment, and I'll fix them, and if there are too many, or some are unfixable, I'll revert the rework.
mistersmee commented on 2024-12-24 16:27 (UTC) (edited on 2024-12-26 07:20 (UTC) by mistersmee)
Note to all existing users (those who will be upgrading the package, not installing it anew, people installing anew should be fine):
When major Python versions switch (as just happened with Python 3.12 -> 3.13), I believe it would be prudent to delete the virtual environment created by the backend, done so manually by doing a
sudo rm -r /opt/open-webui/backend/venv
, and then reinstalling the open-webui package, thus rebuilding the virtual environment with the new Python major version.Just reinstalling the open-webui package without removing or uninstalling makes sure that your user data, that is used in openwebui, for e.g., your admin password, remains as it is.
As an addendum, this might be applicable when the python package itself is changed due to dependency mismatches (again, as just happened when I changed the dependency from
python
topython312
, and would happen again once python 3.13 is supported upstream back topython
frompython312
), I'm not so sure about this, so testing might be needed, but just to be safe, please do so as well.This is so that any mismatches between the Python version that created the virtualenv and the Python version in use, and any problems that might arise from that, can be avoided.