Stuck getting AI Hat2+ working

Ok folks, long story. Sorry.

Just bought a Pi 5 8G, PSU, case AT-Hat2+, heat sink.

In an attempt to get an AI LLM working.

I’ve tried 3 sites now on how to get it working, but they all fail at the same point.

sudo dpkg -i hailo_gen_ai_model_zoo_*.deb
(Reading database ... 95624 files and directories currently installed.)
Preparing to unpack hailo_gen_ai_model_zoo_5.1.1_arm64.deb ...
Unpacking hailo-gen-ai-model-zoo (5.1.1) over (5.1.1) ...
Setting up hailo-gen-ai-model-zoo (5.1.1) ...
chmod: cannot access '/usr/share/hailo-ollama/models': No such file or directory
dpkg: error processing package hailo-gen-ai-model-zoo (--install):
 installed hailo-gen-ai-model-zoo package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 hailo-gen-ai-model-zoo

(Cringe, on my screen that looks horrible.)

The line of concern:
chmod: cannot access '/usr/share/hailo-ollama/models': No such file or directory

And - of course - it is true.
That directory doesn’t exist.
There is a hailo-models.
But no hailo-ollama/......

So I am really stuck with what to do.
THREE sites all get to that command and it fails.

People have used it, so it can’t be wrong. But it seems to hate me.

There are only about 4 commands before this, and all worked.

I’ve installed the cut down version of the latest O/S (64 bit)
It is headless BTW.

Anyway. I’m stuck.
Asked in a few places. But if I stop asking: Sod’s law will happen and I won’t get an answer.
But if I keep asking, the last one will get me the answer.

Thanks in advance.

Hey @Andrew41918,

First of all, it has been a good while since I last touched any AI HAT2 commands, so I’m pretty rusty, but I think I was getting a similar issue, and I had a squizz and found a GitHub issue for the thing you are getting stuck on.

I ended up getting frustrated and did it all in a more manual route. I can’t remember the exact instructions but just to point you in the right direction, I created a Hailo Developer Zone account, then I went to the page for the Hailo 10H (the AI HAT 2 chip), and downloaded the PCIe driver, Runtime Library, and Python Wheel for it. I have the commands copy pasted here but they are going to be out of date, head to there and look for the newest versions. But it should look something like:

cd ~/Downloads
# PCIe Driver
wget https://hailo-model-zoo.s3.us-west-2.amazonaws.com/HailoRT/v5.1.0/hailort-pcie-driver_4.19.0_all.deb
# Runtime Library
wget https://hailo-model-zoo.s3.us-west-2.amazonaws.com/HailoRT/v5.1.0/hailort_5.1.0_arm64.deb
# Python Wheel (cp312)
wget https://hailo-model-zoo.s3.us-west-2.amazonaws.com/HailoRT/v5.1.0/hailort-5.1.0-cp312-cp312-linux_aarch64.whl

But update the versions with the newest versions you find in Dev Zone. Then you will need to install the PCIe driver, and Runtime library, then reboot.

Create your Venv, then install the wheel. Then I installed Hailo Apps, and also installed the compiled model from Hailo Dev Zone as well:

wget https://hailo-model-zoo.s3.us-west-2.amazonaws.com/ModelZoo/Compiled/v2.13.0/hailo10h/qwen2_vl_instruct_2b_hailo10h.hef -O ~/hailo_apps_work/qwen2_vl_instruct_2b_hailo10h.hef

Sorry I can’t go into exact steps for all of this, but this is hopefully enough to show you another possible route. There were a lot of little weird quirks we had to do as we installed this pre-release and compatibility was weird at the time.

If you punch this into an LLM, they might be able to help get you going as well!

Hope this helps!

1 Like

Well,
for reasons unknown: I have got past that point now.
I am needing to choose which LLM to install.

I play with JS a lot.
Rather complicated code.

Suggestions?

I uninstalled the entire ollama package and did it again.

Great news!

It is very close to working now.

But I’m stuck on this part.

The pages loaded, I created an account - bogus email as it is all local - and it gets to this point.

Again: to the best of my knowledge, I’ve done every step to this point.
So I don’t get why the server connection error is happening.

Latest:

This error doesn’t look good:

curl http://localhost:8000/api/generate -d '{
  "model": "qwen2.5-coder:1.5b",
  "prompt": "hello",
  "stream": false
}'
server=oatpp/1.4.0
code=500
description=Internal Server Error
stacktrace:
  - No suitable mapper found to deserialize the request body.
  - [ApiController]: Error processing request
  - Error processing request

The AI model is to be accessed on/from OTHER machines on this network.
NOT locally.
It is headless.

Hey there, @Andrew41918, have you set up the AI Model with the server’s IP address or just with localhost?

The error that you’re getting seems a lot like the server is handing out the url http://localhost:8000/api/generate . When the client gets that message, it’s just going to look to its own localhost:8000, find nothing, and return the error. That usually happens because the server’s settings are pointing to localhost instead of one of its actual IP Addresses.

I’m uncertain what configuration that you’re using for the AI API, but I think you’ll need to update i to its static IP Address. That way when an url is handed out, like in the above, it will point to the link: http://192.168.17.86:8000/api/generate

Could you also share what guide you’re following to set up the AI Server? It’ll help us out with troubleshooting going forward.

(Alas as I am using the dark theme I can’t read the important parts in your reply.

ie: the bits between the single back quotes like that block.

It is white on white.

I went down that rabbit hole with the help of GPT and made the situation worse.
(no offence to you)

Not saying you are wrong, but I did some other testing and it was suggested to me that the IP adress shouldn’t matter.

I can get to the UI (web page) ok. Just when I ask it a question it falls over.

Trying it from the Pi’s Terminal asking it a question it falls over too.
So the actual AI isn’t talking to the machine behind the scenes.
Or something like that.

For now it is an expensive paper weight.

:frowning:
:cry:

Sorry, the link:
This one:
This one.

But I have also tried another one too.
Fails pretty much in the same way.

The video on that link has a lot of stuff skipped by the instructions -which is also annoying.

Hey there, @Andrew41918,

Ok, if its fails from the Pi’s own terminal too, then the networking stuff is probably a loose end.

Are you getting the same error when you’re trying it in the Pi’s terminal? Or is it a different error?

I’m not sure I get the question.

The Pi is headless.

I try web access from THIS machine and it fails.
I try a terminal/CLI access after SSH to the PI and it fails that way too.

that not the same way in both cases. More meant in the way of it fails no matter which way I try it.

I can’t try accessing the GUI from the PI on the PI as it hasn’t got a monitor or keyboard.

Yes, I will have to connect them to it and see what happens.
The only problem with that is, I then don’t have direct access to the internet / web browser, as I haven’t installed the “desktop”. Only the cut down release which is CLI only on the PI.
So I am a bit confused how I would get to the localhost page anyway, if a browser isn’t installed.

And - sorry - life has been a but busy so I can’t just quickly plug in a monitor and keyboard to quickly test it either.

(Yeah, my problem. Just explaining the situation at this end.)

Hey there, @Andrew41918,

Oh sorry. I meant that since you mentioned that you were using this via terminal, I assumed that you must be SSHing into the Pi 5. This would mean that you had the permissions of the user you set up on the Pi 5 when you ran the command as well as the same network settings, unless you specifically configured it otherwise.

I was asking because if a web user was having the same error as a local user on the server itself, it would suggest the issue was a local one and not networking. After attempting to use that curl command again, preferably via SSH, could you please run the following and share the output with us:

sudo journalctl -xe --no-pager | tail -80

As requested and sorry for the delay.

░░ A start job for unit docker-56edaf29f6ade17156344d4cc176007f74b3dd9c002827155add3a92a5884556.scope has finished successfully.
░░ 
░░ The job identifier is 1420.
Jul 10 13:58:22 AI-Pi containerd[835]: time="2026-07-10T13:58:22.185198530+10:00" level=warning msg="error from *cgroupsv2.Manager.EventChan" error="failed to add inotify watch for \"/sys/fs/cgroup/system.slice/docker-56edaf29f6ade17156344d4cc176007f74b3dd9c002827155add3a92a5884556.scope/memory.events\": no such file or directory"
Jul 10 13:58:32 AI-Pi dockerd[858]: time="2026-07-10T13:58:32.745781359+10:00" level=info msg="sbJoin: gwep4 ''->'', gwep6 ''->''" eid=64af6d8d1c86 ep=open-webui net=host nid=1cb0849c63a5
Jul 10 13:58:39 AI-Pi dockerd[858]: time="2026-07-10T13:58:39.831118635+10:00" level=info msg="Loading containers: done."
Jul 10 13:58:39 AI-Pi dockerd[858]: time="2026-07-10T13:58:39.868793079+10:00" level=warning msg="WARNING: No memory limit support"
Jul 10 13:58:39 AI-Pi dockerd[858]: time="2026-07-10T13:58:39.868821524+10:00" level=warning msg="WARNING: No swap limit support"
Jul 10 13:58:39 AI-Pi dockerd[858]: time="2026-07-10T13:58:39.868850153+10:00" level=info msg="Docker daemon" commit=8ec5ab3 containerd-snapshotter=true storage-driver=overlayfs version=29.6.1
Jul 10 13:58:39 AI-Pi dockerd[858]: time="2026-07-10T13:58:39.869629517+10:00" level=info msg="Initializing buildkit"
Jul 10 13:58:40 AI-Pi dockerd[858]: time="2026-07-10T13:58:40.830510732+10:00" level=info msg="Completed buildkit initialization"
Jul 10 13:58:40 AI-Pi dockerd[858]: time="2026-07-10T13:58:40.835759915+10:00" level=info msg="Daemon has completed initialization"
Jul 10 13:58:40 AI-Pi dockerd[858]: time="2026-07-10T13:58:40.835816804+10:00" level=info msg="API listen on /run/docker.sock"
Jul 10 13:58:40 AI-Pi systemd[1]: Started docker.service - Docker Application Container Engine.
░░ Subject: A start job for unit docker.service has finished successfully
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ A start job for unit docker.service has finished successfully.
░░ 
░░ The job identifier is 131.
Jul 10 13:58:40 AI-Pi systemd[1]: Reached target multi-user.target - Multi-User System.
░░ Subject: A start job for unit multi-user.target has finished successfully
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ A start job for unit multi-user.target has finished successfully.
░░ 
░░ The job identifier is 1.
Jul 10 13:58:40 AI-Pi systemd[1]: Starting cloud-final.service - Cloud-init: Final Stage...
░░ Subject: A start job for unit cloud-final.service has begun execution
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ A start job for unit cloud-final.service has begun execution.
░░ 
░░ The job identifier is 140.
Jul 10 13:58:40 AI-Pi cloud-init[566]: Cloud-init v. 25.2 running 'modules:final' at Fri, 10 Jul 2026 03:58:40 +0000. Up 111.31 seconds.
Jul 10 13:58:41 AI-Pi cloud-init[566]: 2026-07-10 03:58:41,762 - modules.py[WARNING]: Could not find module named cc_netplan_nm_patch (searched ['cc_netplan_nm_patch', 'cloudinit.config.cc_netplan_nm_patch'])
Jul 10 13:58:41 AI-Pi cloud-init[566]: Cloud-init v. 25.2 finished at Fri, 10 Jul 2026 03:58:41 +0000. Datasource DataSourceNoCloud [seed=ds_config_seedfrom,file:///boot/firmware][dsmode=local].  Up 112.23 seconds
Jul 10 13:58:41 AI-Pi sh[1248]: Completed socket interaction for boot stage final
Jul 10 13:58:41 AI-Pi systemd[1]: Finished cloud-final.service - Cloud-init: Final Stage.
░░ Subject: A start job for unit cloud-final.service has finished successfully
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ A start job for unit cloud-final.service has finished successfully.
░░ 
░░ The job identifier is 140.
Jul 10 13:58:41 AI-Pi systemd[1]: Reached target cloud-init.target - Cloud-init target.
░░ Subject: A start job for unit cloud-init.target has finished successfully
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ A start job for unit cloud-init.target has finished successfully.
░░ 
░░ The job identifier is 136.
Jul 10 13:58:41 AI-Pi systemd[1]: Startup finished in 3.353s (kernel) + 1min 48.888s (userspace) = 1min 52.242s.
░░ Subject: System start-up is now complete
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ All system services necessary queued for starting at boot have been
░░ started. Note that this does not mean that the machine is now idle as services
░░ might still be busy with completing start-up.
░░ 
░░ Kernel start-up required 3353911 microseconds.
░░ 
░░ Initrd start-up required INITRD_USEC microseconds.
░░ 
░░ Userspace start-up required 108888649 microseconds.
Jul 10 13:58:42 AI-Pi systemd[1]: cloud-init-main.service: Deactivated successfully.
░░ Subject: Unit succeeded
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ The unit cloud-init-main.service has successfully entered the 'dead' state.
Jul 10 14:03:22 AI-Pi sudo[1481]:      dog : TTY=pts/0 ; PWD=/home/dog ; USER=root ; COMMAND=/usr/bin/journalctl -xe --no-pager
Jul 10 14:03:22 AI-Pi sudo[1481]: pam_unix(sudo:session): session opened for user root(uid=0) by dog(uid=1000)

I’m guessing this line is a problem:
13:58:22 AI-Pi containerd[835]: time="2026-07-10T13:58:22.185198530+10:00" level=warning msg="error from *cgroupsv2.Manager.EventChan" error="failed to add inotify watch for \"/sys/fs/cgroup/system.slice/docker-56edaf29f6ade17156344d4cc176007f74b3dd9c002827155add3a92a5884556.scope/memory.events\": no such file or directory"

1 Like

After a lot of trial and error:

I have it working.

I don’t know what I did though.

RESOLVED

2 Likes