Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poetry fails to install properly #65

Open
Elhorian opened this issue Dec 13, 2024 · 11 comments
Open

Poetry fails to install properly #65

Elhorian opened this issue Dec 13, 2024 · 11 comments
Assignees

Comments

@Elhorian
Copy link

Hi there, just a heads up as someone might stumble upon this, but frst, thanks to everyone working on this so far.

I was trying to install immich to a bare VM netinst debian 12, everything was going dandy until ML install section where suddenly poetry wanted to downgrade charset-normalizer, then it went kablooie.

I found some old issues with poetry doing this in windows installs (for version 1.4, nor my case with windows either), but sounded familiar as first it tried to uninstall the package, then proceeded to fail.

Anyways, seems like trying to install poetry by hand, following the script steps finally did the trick.

@Elhorian
Copy link
Author

Elhorian commented Dec 13, 2024

I went ahead and updated to 1.22.2, so I had to repeat and document steps:
cd /<immichpath>/app/machine-learning/ && cp /<immichpath>/source/machine-learning/pyproject.toml . && . venv/bin/activate
pip3 install gunicorn pydantic pydantic_settings rich uvicorn orjson fastapi onnxruntime huggingface_hub tokenizers insightface aiocache python-multipart
/<immichpath>/app/machine-learning/venv/bin/poetry install --no-root --with dev --with openvino

I will report back if all goes ok

@Elhorian
Copy link
Author

Block with pre-requisites, commented install line here. I've also removed the poetry update call
#pip3 install poetry -i $PROXY_POETRY
pip3 install gunicorn pydantic pydantic_settings rich uvicorn orjson fastapi onnxruntime huggingface_hub tokenizers insightface aiocache python-multipart

Block with the python 3.12 workaround for Debian 12, added install here so poetry install works
sed -i -e 's/<3.12/<4/g' pyproject.toml
# Added the install here, removed the previous update statement. I have intel iGPU so I left only openvino
poetry install --no-root --with dev --with openvino

@loeeeee loeeeee self-assigned this Dec 15, 2024
@123mariachi123
Copy link

123mariachi123 commented Dec 21, 2024

I tried to replicate what you wrote @Elhorian because i also have issues installing poetry, however, in my case it fails because of the dependency of onnxruntime-openvino 1.18.0 which seems to be not available anymore. At least not in Ubuntu 24.04 with python 12. Any ideas how to work around this?

@Elhorian
Copy link
Author

@123mariachi123 no idea, in my case it's Debian 12 what I'm using.
This is the install ml section corrected, I can update it like this.
image

@123mariachi123
Copy link

Thanks for the response @Elhorian. This is what i did as well after i read your post. Then i guess its a different issue on Ubuntu. It seems that in my python installation in Ubuntu, the version 1.18.0 of onnxruntime-openvino is not available.
I don't know how to fix or circumvent this though. Maybe @loeeeee can help?

@Elhorian
Copy link
Author

Did you try forcing pip to install that specific version (from inside the virtual environment)?
pip3 install onnxruntime-openvino==1.18.0

@123mariachi123
Copy link

123mariachi123 commented Dec 23, 2024

Yes i tried that. Brings me to the exact same message that this version is not available. I can install 1.20.0 though.
I then tried to trick poetry to use 1.20.0 by using 'sed' to modify the pyproject file within the install.sh. However, then i got an error because of some lock file. I dont know poetry and at this point i stoped.
I dont know if the pyproject file is written on the fly or how i can change it (did not find it prior to running install.sh). Would be interesting though if poetry would work with 1.20.0

@Heire
Copy link

Heire commented Dec 29, 2024

Doing a first install to explore immich in lxc environment and found the same issue but was able to install onnxruntime in pip3 venv. No idea if this has an impact further in the install script?

@123mariachi123
Copy link

@Heire may i ask what is your environment? Debian? Which python version is installed on your LXC?

@Heire
Copy link

Heire commented Dec 31, 2024

@Heire may i ask what is your environment? Debian? Which python version is installed on your LXC?

Fresh LXC installation on ubuntu 24.02 (proxmox host is debian 12).
Python is 3.12.3
Not sure if pip was already installed but I just ran the pip command to install onnxruntime (in the venv environment, same as in your script for the ML).
However one thing to add is the user rights on the /dev/dri/renderD128 and card0), i've put them on 666 and now the ML works (at least it seems so :))
Everything works except i'm stuck on the transcoding video part, still need to investigate why is that. only a reboot solves it for a few transcodes then it stops again.

@123mariachi123
Copy link

FYI switched from Ubuntu to Debian and the problem was gone. Thanks for your great work @loeeeee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants