Py-spy in Home Assistant running on RPi 3 with HassOS-based image

Has anyone gotten py-spy to work within the Home Assistant container running in HassOS on a Raspberry Pi 3?

I downloaded the armv7 binary package of py-spy 0.3.3 and when I try to run it I get the error “No such file or directory”. Some quick googling tells me that the docker capability “SYS_PTRACE” is needed.

I tried to change the “hostconfig.json” in the /mnt/data/docker/containers// folder but it is overwritten after each restart.

Is it possible to make persistent changes to the docker configuration of the homeassistant container?

Why don’t you simply add that capability when starting the container?

I would if I knew how. It’s all very automatic when running HassOS, and I have no idea where to inject this. It would be easy if I ran a more capable base OS and hass.io as a separate appliance, which I am considering more and more.

I’m also more and more interested in this application but don’t know how to install on hassio? Anybody can help us or say if it is possible?

I think the same about this.
Maybe someone can even make an integration of it?

Hi there, I would also like to have detailed instruction on how to install py-spy on hassOS on raspberry pi.
Anyone could help?

Even if you would be able to install it, it would be overwritten on every restart. It’d be better to run Home Assistant Supervised, this way you have full control over the Host OS.

ssh [email protected] -p 22222
login
docker exec -it homeassistant /bin/bash
echo 'manylinux1_compatible = True' > /usr/local/lib/python3.8/site-packages/_manylinux.py
pip install py-spy

Have you gotten this to work on a Raspberry Pi?

py-spy requires the SYS_PTRACE capability in the docker container where it is executing, which my installation doesn’t seem to have. Did you add this to yours somehow?

I did all those steps on a NUC with Home Assistant Operating System v4.13 and then I could use Py-Spy.
Only after a reboot I have to do all these steps again.

By the way, I made a WTH WTH: Isn't Py-Spy integrated in Home-Assistant?