microsoft / llguidance

Low-level Guidance Parser
MIT License
18 stars 3 forks source link

Install of llguidance on Pi 5 #23

Open v-jkegler opened 1 week ago

v-jkegler commented 1 week ago

I am opening this issue to keep my questions about this install from cluttering other threads.

v-jkegler commented 1 week ago

@mmoskal I have the following problem. It complains about a hash mismatch in the archives:

(llgen) jeffreykegler@raspberrypi:~/projects/python $ pip install wheels/* Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Processing ./wheels/torch-2.4.1-cp311-cp311-manylinux2014_aarch64.whl Collecting filelock Using cached https://www.piwheels.org/simple/filelock/filelock-3.16.1-py3-none-any.whl (16 kB) Collecting typing-extensions>=4.8.0 Using cached https://www.piwheels.org/simple/typing-extensions/typing_extensions-4.12.2-py3-none-any.whl (37 kB) Collecting sympy Downloading https://www.piwheels.org/simple/sympy/sympy-1.13.3-py3-none-any.whl (6.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━╺━━━━━━━━━━━━━━ 3.9/6.2 MB 70.6 kB/s eta 0:00:33 ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them. sympy from https://www.piwheels.org/simple/sympy/sympy-1.13.3-py3-none-any.whl#sha256=e925802e5d4708a0cceae3cae0ffb568385a7c6f9d8eeab652b0e71630cbc275 (from torch==2.4.1): Expected sha256 e925802e5d4708a0cceae3cae0ffb568385a7c6f9d8eeab652b0e71630cbc275 Got ce0f8620b3e5b40f3ead29372ae079c3644018bf6c10461b88fdea1c8d33d490

v-jkegler commented 1 week ago

@mmoskal @hudson-ai I found a workaround. One of the archives the Pi 5 pip was using was piwheels.org. I removed this from the config and now am moving forward again.

v-jkegler commented 1 week ago

I should add the @riedgar-ms pointed out that there was a known problem with the ARM architecture and the piwheels archive: https://github.com/piwheels/packages/issues/119

v-jkegler commented 1 week ago

@mmoskal @hudson-ai @riedgar-ms A new problem, which could be crates.io being to large to download, or the 'anyhow' dependency. (For large files, I often have to find the URL and run curl to get them, then use the local copy.)

(llgen) jeffreykegler@raspberrypi:~/projects/llguidance $ ./scripts/test-guidance.sh Running sample_parser Updating crates.io index error: failed to get anyhow as a dependency of package sample_parser v0.1.0 (/home/jeffreykegler/projects/llguidance/sample_parser)

Caused by: failed to load source for dependency anyhow

Caused by: Unable to update registry crates-io

Caused by: failed to fetch https://github.com/rust-lang/crates.io-index

Caused by: network failure seems to have happened if a proxy or similar is necessary net.git-fetch-with-cli may help here https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli

Caused by: SSL error: 0xffff8780 - SSL - The peer notified us that the connection is going to be closed; class=Ssl (16)