There is no documentation how to run inference inside a Docker container.
I have understood that hailort should be installed on the host, and the host should run hailort.service so it can schedule models.
The docker container has installed pyhailort wheel.
When running the container it is unable to find libhailort
ImportError: libhailort.so.4.20.0: cannot open shared object file: No such file or directory
I have taken libhailort.so libhailort.so.4.20.0 and hailortcli and copied them INTO the container at /usr/local/lib and /usr/local/bin
pyhailo is then able to find libhailort but fails because HailoRT service is not active
[HailoRT] [error] CHECK_GRPC_STATUS failed with error code: 14.
[HailoRT] [warning] Make sure HailoRT service is enabled and active!
The HailoRT service is in fact running on the host.
This has been very frustrating, can you please share a working Dockerfile
There is no hailort-service.sock file in /var/run/hailo
I did however find a hailort_uds.sock file in /tmp. Mapping it as a volume in the container solved the communication issue with the host.
$ ls /var/run/hailo/
hailort_service.pid
$ ls /tmp/
hailort-service
hailort_uds.sock
[...]
$ ls /tmp/hailort-service/
I have installed Hailo via dpkg --install hailort-pcie-driver_4.20.0_all.deb on the host.
What could explain the discrepancies of where the .sock file is located?
Yeah, this changed between versions 4.17 and 4.18. The default location for the HailoRT and driver UDS (Unix Domain Socket) moved in different releases:
Older versions (up to around v4.17) used: /var/run/hailo/hailort-service.sock
Newer versions (v4.18 and up) usually use: /tmp/hailort_uds.sock or /tmp/hailort-service/hailort_uds.sock