Closed jneilliii closed 5 months ago
Would you tell me how to download Octoprint's stretch and bookworm releases?
If you use stretch,
would you try to run
if you use bookworm,
I believe as long as it is x64 system,
pip install onnxruntime would solve everything.
If it is x32 system,
You should find the onnxruntime on your platfrom here:
https://github.com/nknytk/built-onnxruntime-for-raspberrypi-linux/tree/master/wheels
and use pip install for those.
something like this may work to figure out which wheel to install.
import os
import re
try:
with open('/etc/os-release', 'r') as file:
# Read the content of the file
content = file.read()
except FileNotFoundError:
content = "unknown"
regex = re.compile(r"PRETTY_NAME=.*\((.*)\)")
test = regex.match(content)
if test:
friendly_name = test.groups()[0]
if friendly_name == "bullseye":
plugin_requires.append("onnxruntime @ https://github.com/nknytk/built-onnxruntime-for-raspberrypi-linux/raw/master/wheels/bullseye/onnxruntime-1.15.0-cp39-cp39-linux_armv7l.whl")
elif friendly_name == "buster":
plugin_requires.append("onnxruntime @ <url to correct wheel>")
elif friendly_name == "bookworm":
plugin_requires.append("onnxruntime @ <url to correct wheel>")
I double check the problem. For stretch, the x32 platform is too old, the onnxruntime in that time would not support my AI model. For bookworm, there is no onnxruntime package for x32. If everyone wants to use it on bookworm, please install the x64 platform. It is working on x64 platform without any issue.
that makes sense, but you may want to document that on the readme. the most common octopi installs out there right now are bullseye and buster, so just handling those two for now would probably reduce some of the support overhead.
This line appears to assume bullseye image, but there are also still stretch and bookworm releases out in the wild.
https://github.com/DrAlexLiu/OctoPrint-PiNozCam/blob/1c9519ced05f8e41434b57615cf8a81be97dcff3/setup.py#L40C5-L40C159