Open knyipab opened 1 week ago
pandas
is easy, but torch
is difficult as it has many dependencies.
I am not familiar and may be stupid to ask: Don't we just need to package torch wheel but not its dependencies? users can fall back to the official pypi repo for those deps installable with pip?
Termux is a rolling distribution and libraries are not intended to be stable. It is almost not possible to use libraries from apt repo.
Do you mean when pip update torch, it does not update the deps libs (cuz that needs pkg update && pkg upgrade
)? So torch of newer version may end up using old deps from apt repo?
No, quite the opposite. The dynamic library in whl may depend on the old version of the library in the apt repository.
I see. So becuz users tend to not update pip packages (even tho they bump together with termux-packages & TUR), therefore the wheel should include all necessary deps libraries for it to function properly, am I right?
I suppose numpy should have the same issue provided its dependency on libopenblas. Unlike pypi, the numpy package on tur's pypi wheel file does not seem to contain a numpy.libs
folder. So may i assume that numpy will use $PREFIX/lib/libopenblas.so
and potentially suffer the same issue?
Yes. Some of the wheels in TUR's pypi don't use auditwheel
to package these libs. You can report it here and I'll rebuild them.
Could we include the mentioned packages into tur pypi?
Actually, I want to package open-webui (a popular LLM frontend). It uses versioned packages which will easily conflict with general termux environment: https://github.com/open-webui/open-webui/blob/main/backend/requirements.txt
So my plan is to package it open-webui in a python virtual environment (perhaps venv) which is also the official suggested way.