enviroplus_exporter icon indicating copy to clipboard operation
enviroplus_exporter copied to clipboard

Container image needs rebuilding to pick up latest python base image, compatible with Raspberry Pi 5

Open mt-inside opened this issue 1 year ago • 3 comments

Running the image published on GHCR works fine on an RPi4, but not an RPi5, where it fails with "exec: file format error". I'm assuming that's because the python interpreter isn't compatible with the newer ARMv8.2 CPU. This is a bit weird because it'd assume it's a superset of the ARMv8 on the RPi4, but I'm not an expert. Either way, building and pushing my own image using your Dockerfile works just fine, so I can only assume it's due to it picking up a later version of the base image, or maybe one of the libraries if they have C components.

mt-inside avatar Feb 22 '24 05:02 mt-inside

On further investigation it's not this - I just didn't give it long enough to error on my slow cluster. Something else in the image isn't working I assume. The only package that's pinned back to a version is pms5003. I'm going to try upgrading that.

mt-inside avatar Feb 22 '24 05:02 mt-inside

Ok this is the weirdest thing. Something about docker buildx-produced images just doesn't work. I tried both the image you publish plus one I built from your sources, both give "exec: file format error" on a Pi 5 but work fine on Pi 4. It's not some esoteric library being pulled into python - the /bin/bash in that container gives me the same error. The Pi 5 itself is fine because I'm able to run other arm64 images on it.

As a last resort, I used Chainguard's apko and melange to make an image instead, and they work! I have no idea what's going on here, something pretty deep I think.

However I've got it working. Let me know if you want me to PR a move from docker buildx to apko+melange (I much prefer them anyway).

If you wanna reproduce: docker.io/mtinside/enviroplus-exporter:cgr is my working image

mt-inside avatar Feb 22 '24 11:02 mt-inside

Hi @mt-inside, thanks for your interest in this project. I currently don't have a Pi 5 to test but if you're willing to create a PR I can have a look at moving to apko+melange. Thanks

tijmenvandenbrink avatar Feb 24 '24 06:02 tijmenvandenbrink