Custom addon - PEP668 compliance

Hey all,
Info seems kinda flaky, or i’m just really tired and can’t use google. I’m trying to build my own addon based of the debian addon image that HA provides, but it won’t let me use pip in the dockerfile if I build it on the HA system. Does that mean i have to build it on my own computer first, then use that image? I thourght continers were isolated and thus python too (if in container).
Thanks for your input.

So after a bit of research, seems to be linked to PEP668. Which stops pip from installing on system. In the case of a docker container this shouldn’t be an issue. Here are the solutions that i’ve found taken from other addons that use pip:

# Install Python packages on system level --> PEP668
ENV PIP_BREAK_SYSTEM_PACKAGES=1

Or use pip in venv.