# Raspberry Pi 4 32bit support

**URL:** <https://forums.balena.io/t/raspberry-pi-4-32bit-support/355718>\
**Category:** balenaOS\
**Created:** [April 7, 2022, 9:44am UTC](https://forums.balena.io/t/raspberry-pi-4-32bit-support/355718 "2022-04-07T09:44:25Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![maartenc](https://avatars.discourse-cdn.com/v4/letter/m/dc4da7/32.png) [@maartenc](https://forums.balena.io/u/maartenc)\
**Post date:** [April 7, 2022, 9:44am UTC](https://forums.balena.io/t/raspberry-pi-4-32bit-support/355718/1 "2022-04-07T09:44:25Z")

</div>

Hi all,

I’m trying to run platerecognizer/alpr-raspberry-pi on balenaos (only aarch64 for rpi4).

Their image is linux/arm. They don’t support aarch64 yet but will add support aarch64 in the future. They proposed to use the default 32bit rpi4 image.

On startup, it shows this warning and then it crashes without output.

> WARNING: The requested image’s platform (linux/arm) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

Is there a way to run this linux/arm image on balenaos?

PS: their image is using tensorflow and probably contains lots of optimizations

---

<div class="post-metadata">

**Author:** ![alanb128](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/alanb128/32/2839_2.png) [@alanb128](https://forums.balena.io/u/alanb128)\
**Post date:** [April 7, 2022, 6:39pm UTC](https://forums.balena.io/t/raspberry-pi-4-32bit-support/355718/2 "2022-04-07T18:39:36Z")

</div>

Hello, I seemed to get it running on a Pi 4 with balenaOS using the following docker-compose.yml file. However, I don’t have a license file/token to test with. Perhaps you can use this as a starting point:

```auto
version: "2.1"
volumes:
    license:
services:
  alpr:
    image: platerecognizer/alpr-raspberry-pi:latest
    restart: always
    privileged: true
    volumes:
        - 'license:/license'
    environment:
      TOKEN: XXX

```

---

<div class="post-metadata">

**Author:** ![maartenc](https://avatars.discourse-cdn.com/v4/letter/m/dc4da7/32.png) [@maartenc](https://forums.balena.io/u/maartenc)\
**Post date:** [April 8, 2022, 7:27am UTC](https://forums.balena.io/t/raspberry-pi-4-32bit-support/355718/4 "2022-04-08T07:27:48Z")

</div>

Hello alanb128,

What output do you get when running this?

I deployed your compose file without apply any changes.  
It first had a warning about the TOKEN.

After adding the TOKEN and LICENSE\_KEY as device variable, it went to continuous restarting without any output from the container.

```auto
08.04.22 09:18:54 (+0200) Service exited 'alpr sha256:ac24f15c000f3a2be4ae3304dbaa99dd027cf8e9d942a74a8d3499642be4fe58'
08.04.22 09:19:20 (+0200) Restarting service 'alpr sha256:ac24f15c000f3a2be4ae3304dbaa99dd027cf8e9d942a74a8d3499642be4fe58'
08.04.22 09:19:20 (+0200) alpr Environment variable TOKEN is missing or invalid. It is a 40 characters long string.
08.04.22 09:19:21 (+0200) Service exited 'alpr sha256:ac24f15c000f3a2be4ae3304dbaa99dd027cf8e9d942a74a8d3499642be4fe58'
08.04.22 09:20:14 (+0200) Restarting service 'alpr sha256:ac24f15c000f3a2be4ae3304dbaa99dd027cf8e9d942a74a8d3499642be4fe58'
08.04.22 09:20:14 (+0200) alpr Environment variable TOKEN is missing or invalid. It is a 40 characters long string.
08.04.22 09:20:15 (+0200) Service exited 'alpr sha256:ac24f15c000f3a2be4ae3304dbaa99dd027cf8e9d942a74a8d3499642be4fe58'
08.04.22 09:21:16 (+0200) Restarting service 'alpr sha256:ac24f15c000f3a2be4ae3304dbaa99dd027cf8e9d942a74a8d3499642be4fe58'
08.04.22 09:21:16 (+0200) alpr Environment variable TOKEN is missing or invalid. It is a 40 characters long string.
08.04.22 09:21:17 (+0200) Service exited 'alpr sha256:ac24f15c000f3a2be4ae3304dbaa99dd027cf8e9d942a74a8d3499642be4fe58'
08.04.22 09:21:34 (+0200) Killing service 'alpr sha256:ac24f15c000f3a2be4ae3304dbaa99dd027cf8e9d942a74a8d3499642be4fe58'
08.04.22 09:21:34 (+0200) Killed service 'alpr sha256:ac24f15c000f3a2be4ae3304dbaa99dd027cf8e9d942a74a8d3499642be4fe58'
08.04.22 09:21:34 (+0200) Installing service 'alpr sha256:ac24f15c000f3a2be4ae3304dbaa99dd027cf8e9d942a74a8d3499642be4fe58'
08.04.22 09:21:35 (+0200) Installed service 'alpr sha256:ac24f15c000f3a2be4ae3304dbaa99dd027cf8e9d942a74a8d3499642be4fe58'
08.04.22 09:21:35 (+0200) Starting service 'alpr sha256:ac24f15c000f3a2be4ae3304dbaa99dd027cf8e9d942a74a8d3499642be4fe58'
08.04.22 09:21:37 (+0200) Started service 'alpr sha256:ac24f15c000f3a2be4ae3304dbaa99dd027cf8e9d942a74a8d3499642be4fe58'
08.04.22 09:21:40 (+0200) Service exited 'alpr sha256:ac24f15c000f3a2be4ae3304dbaa99dd027cf8e9d942a74a8d3499642be4fe58'
08.04.22 09:21:42 (+0200) Restarting service 'alpr sha256:ac24f15c000f3a2be4ae3304dbaa99dd027cf8e9d942a74a8d3499642be4fe58'
08.04.22 09:21:46 (+0200) Service exited 'alpr sha256:ac24f15c000f3a2be4ae3304dbaa99dd027cf8e9d942a74a8d3499642be4fe58'
08.04.22 09:21:46 (+0200) Restarting service 'alpr sha256:ac24f15c000f3a2be4ae3304dbaa99dd027cf8e9d942a74a8d3499642be4fe58'
08.04.22 09:21:46 (+0200) Killing service 'alpr sha256:ac24f15c000f3a2be4ae3304dbaa99dd027cf8e9d942a74a8d3499642be4fe58'
08.04.22 09:21:49 (+0200) Service exited 'alpr sha256:ac24f15c000f3a2be4ae3304dbaa99dd027cf8e9d942a74a8d3499642be4fe58'
08.04.22 09:21:49 (+0200) Killed service 'alpr sha256:ac24f15c000f3a2be4ae3304dbaa99dd027cf8e9d942a74a8d3499642be4fe58'
08.04.22 09:21:50 (+0200) Installing service 'alpr sha256:ac24f15c000f3a2be4ae3304dbaa99dd027cf8e9d942a74a8d3499642be4fe58'

```

---

<div class="post-metadata">

**Author:** ![alanb128](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/alanb128/32/2839_2.png) [@alanb128](https://forums.balena.io/u/alanb128)\
**Post date:** [April 8, 2022, 3:57pm UTC](https://forums.balena.io/t/raspberry-pi-4-32bit-support/355718/5 "2022-04-08T15:57:31Z")

</div>

@maartenc mine had a warning about a license file, which is why I moved license from a variable to a volume. Since I did not have a license file, it just kept warning about that: ` alpr License file not found. Request failed with code 404.`

---

<div class="post-metadata">

**Author:** ![mpous](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mpous/32/4742_2.png) [@mpous](https://forums.balena.io/u/mpous)\
**Post date:** [April 15, 2022, 11:27am UTC](https://forums.balena.io/t/raspberry-pi-4-32bit-support/355718/7 "2022-04-15T11:27:11Z")

</div>

Hello @maartenc were you able to successfully run platerecognizer? Let us know if we can help you more!

---

<div class="post-metadata">

**Author:** ![maartenc](https://avatars.discourse-cdn.com/v4/letter/m/dc4da7/32.png) [@maartenc](https://forums.balena.io/u/maartenc)\
**Post date:** [April 15, 2022, 3:42pm UTC](https://forums.balena.io/t/raspberry-pi-4-32bit-support/355718/9 "2022-04-15T15:42:08Z")

</div>

I didn’t succeed.  
I’m waiting for platerecognizer to release a aarch64 version.

Not sure if there is another approach like emulating 32bit on the 64bit BalenaOS?

---

<div class="post-metadata">

**Author:** ![mpous](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mpous/32/4742_2.png) [@mpous](https://forums.balena.io/u/mpous)\
**Post date:** [April 15, 2022, 3:54pm UTC](https://forums.balena.io/t/raspberry-pi-4-32bit-support/355718/10 "2022-04-15T15:54:49Z")

</div>

What error do you get now @maartenc ?

---

<div class="post-metadata">

**Author:** ![alanb128](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/alanb128/32/2839_2.png) [@alanb128](https://forums.balena.io/u/alanb128)\
**Post date:** [April 18, 2022, 3:41pm UTC](https://forums.balena.io/t/raspberry-pi-4-32bit-support/355718/12 "2022-04-18T15:41:54Z")

</div>

@maartenc the various license/token error messages appear to be coming from within the container, so it seems to be running under the 64 bit OS. Have you been able to provide a valid license/token to get past those messages and more towards ones that can provide additional insight about any compatibility issue between 32/64 bit?

---

<div class="post-metadata">

**Author:** ![maartenc](https://avatars.discourse-cdn.com/v4/letter/m/dc4da7/32.png) [@maartenc](https://forums.balena.io/u/maartenc)\
**Post date:** [April 19, 2022, 7:19am UTC](https://forums.balena.io/t/raspberry-pi-4-32bit-support/355718/14 "2022-04-19T07:19:10Z")

</div>

After setting the token and license, there container just stops (crash?) without output.

On other platforms, it prints a message about the license consumption and it prints that the workers are started. And it keeps running.

---

<div class="post-metadata">

**Author:** ![mpous](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mpous/32/4742_2.png) [@mpous](https://forums.balena.io/u/mpous)\
**Post date:** [April 22, 2022, 10:16am UTC](https://forums.balena.io/t/raspberry-pi-4-32bit-support/355718/15 "2022-04-22T10:16:40Z")

</div>

@maartenc could you please confirm the device type of the fleet that you created?

Actually if you create a fleet for Raspberry Pi 3 (32 bits), deploy the code there and then add your Raspberry Pi 4? It will run a 32 bit container on the Raspberry Pi 4 (with 64 bit OS).

Reading the thread i’m not sure if you are running under these conditions or not. Could you please clarify? Thanks

---

<div class="post-metadata">

**Author:** ![maartenc](https://avatars.discourse-cdn.com/v4/letter/m/dc4da7/32.png) [@maartenc](https://forums.balena.io/u/maartenc)\
**Post date:** [April 22, 2022, 12:51pm UTC](https://forums.balena.io/t/raspberry-pi-4-32bit-support/355718/17 "2022-04-22T12:51:41Z")

</div>

Hello mpous,

I wasn’t aware that a aarch64 RPi4 could run inside a armv7hf fleet.  
I’ve create a new fleet and moved the RPi4 into it.

I tried to run PlateRecognizer and uninstall the license on both fleets.  
For comparison, I also added the output of the same commands on a working NUC device.

You can see that there is no PlateRecognizer output on the RPi4 beside the arch warning.  
If we run the same PlateRecognizer image on RPi 32bit OS, it has the similar output as on the NUC.

### RPi4 aarch64 on armv7hf fleet (moved from aarch64 fleet)

Run:

```auto
root@dbbe08e:~# balena run --rm -v 1926481_license:/license -e LICENSE_KEY= ***-e TOKEN=*** ac24f15c000f
WARNING: The requested image's platform (linux/arm) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

```

Uninstall license:

```auto
root@dbbe08e:~# balena run --rm -v 1926481_license:/license -e UNINSTALL=1 -e TOKEN=*** ac24f15c000f
WARNING: The requested image's platform (linux/arm) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

```

### RPi4 aarch64 on aarch64 fleet (moved from armv7hf fleet)

Run:

```auto
root@dbbe08e:~# balena run --rm -v 1919856_license:/license -e LICENSE_KEY= ***-e TOKEN=*** ac24f15c000f
WARNING: The requested image's platform (linux/arm) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

```

Uninstall license:

```auto
root@dbbe08e:~# balena run --rm -v 1919856_license:/license -e UNINSTALL=1 -e TOKEN=*** ac24f15c000f
WARNING: The requested image's platform (linux/arm) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

```

### NUC amd64 on amd64 fleet

Run:

```auto
root@f9e69c0:~# balena run --rm -e LICENSE_KEY= ***-v 1919848_platerecognizerLicense:/license -e TOKEN=*** b2e8fc363fff
PlateRecognizer v1.29.0
Starting online registration
You have used 8/20 license(s).
License Key: ***
Usage since 2022-03-27: 279/2500 calls.
Loading...
Loading detection zones.
[worker-0] Ready!
Closing Down...

```

Uninstall license:

```auto
root@f9e69c0:~# balena run --rm -e UNINSTALL=1 -v 1919848_platerecognizerLicense:/license -e TOKEN=*** b2e8fc363fff
PlateRecognizer v1.29.0
Successfully uninstalled SDK. You may now install it on another machine.

```

---

<div class="post-metadata">

**Author:** ![mpous](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mpous/32/4742_2.png) [@mpous](https://forums.balena.io/u/mpous)\
**Post date:** [April 22, 2022, 4:07pm UTC](https://forums.balena.io/t/raspberry-pi-4-32bit-support/355718/18 "2022-04-22T16:07:53Z")

</div>

mmmm can you confirm that the base image that you use is 32 bits!

is it running on `amd64` on balena @maartenc ?

---

<div class="post-metadata">

**Author:** ![mpous](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mpous/32/4742_2.png) [@mpous](https://forums.balena.io/u/mpous)\
**Post date:** [April 27, 2022, 11:18am UTC](https://forums.balena.io/t/raspberry-pi-4-32bit-support/355718/19 "2022-04-27T11:18:40Z")

</div>

Hello @maartenc after speaking with some colleagues about your error, did you try to run this on the Pi 4?

```auto
balena run --platform linux/arm --rm -v 1926481_license:/license -e LICENSE_KEY= ***-e TOKEN=*** ac24f15c000f

```

looks like it goes to the default platform instead of forcing to the linux/arm.

Let us know if this works!

---

<div class="post-metadata">

**Author:** ![maartenc](https://avatars.discourse-cdn.com/v4/letter/m/dc4da7/32.png) [@maartenc](https://forums.balena.io/u/maartenc)\
**Post date:** [April 27, 2022, 12:37pm UTC](https://forums.balena.io/t/raspberry-pi-4-32bit-support/355718/21 "2022-04-27T12:37:51Z")

</div>

Hello,

The base image platerecognizer/alpr-raspberry-pi is only available as 32bit.  
If I inspect the image, it print arm for architecture.

It’s running fine on amd64 with image platerecognizer/alpr

I tried with the platform argument.  
Now, it doesn’t print anything. Also the image platform warning log isn’t printed anymore.  
So, I assume the platform is now 32bit.  
But for some reason, the platerecognizer still doens’t start.

---

<div class="post-metadata">

**Author:** ![mpous](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mpous/32/4742_2.png) [@mpous](https://forums.balena.io/u/mpous)\
**Post date:** [April 29, 2022, 11:57am UTC](https://forums.balena.io/t/raspberry-pi-4-32bit-support/355718/22 "2022-04-29T11:57:58Z")

</div>

Do you see any logs now or just nothing?

---

<div class="post-metadata">

**Author:** ![maartenc](https://avatars.discourse-cdn.com/v4/letter/m/dc4da7/32.png) [@maartenc](https://forums.balena.io/u/maartenc)\
**Post date:** [April 29, 2022, 12:50pm UTC](https://forums.balena.io/t/raspberry-pi-4-32bit-support/355718/24 "2022-04-29T12:50:29Z")

</div>

Just nothing.

---

<div class="post-metadata">

**Author:** ![alanb128](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/alanb128/32/2839_2.png) [@alanb128](https://forums.balena.io/u/alanb128)\
**Post date:** [April 29, 2022, 8:22pm UTC](https://forums.balena.io/t/raspberry-pi-4-32bit-support/355718/26 "2022-04-29T20:22:08Z")

</div>

I tried running this on a 32 bit balenaOS on a Pi 3B+, but without a valid license file I just get “Environment variable TOKEN is missing or invalid. It is a 40 characters long string.” so it’s difficult to know if that works. Are you able to try on such a device to see if that makes a difference?

---

<div class="post-metadata">

**Author:** ![maartenc](https://avatars.discourse-cdn.com/v4/letter/m/dc4da7/32.png) [@maartenc](https://forums.balena.io/u/maartenc)\
**Post date:** [May 5, 2022, 12:22pm UTC](https://forums.balena.io/t/raspberry-pi-4-32bit-support/355718/29 "2022-05-05T12:22:38Z")

</div>

Hello @alanb128,

I tried it on a 3B+ with BalenaOS 32bit.  
That works fine.

The output:

```auto
root@43390be:~# balena run --rm -v license:/license -e LICENSE_KEY= ***-e TOKEN=*** platerecognizer/alpr-raspberry-pi
PlateRecognizer v1.30.0
License Key: jZDNZjx44e
Usage since 2022-05-02: 0/2500 calls.
Loading...
Loading detection zones.
Closing Down...

```

Anything else I could try?

---

<div class="post-metadata">

**Author:** ![mpous](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mpous/32/4742_2.png) [@mpous](https://forums.balena.io/u/mpous)\
**Post date:** [May 6, 2022, 12:06pm UTC](https://forums.balena.io/t/raspberry-pi-4-32bit-support/355718/31 "2022-05-06T12:06:05Z")

</div>

Hello @maartenc Alan asked internally to the balena team why is this not working. We will keep researching why it’s not working and we will let you know.

Thanks

---

<div class="post-metadata">

**Author:** ![mpous](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mpous/32/4742_2.png) [@mpous](https://forums.balena.io/u/mpous)\
**Post date:** [May 18, 2022, 9:13am UTC](https://forums.balena.io/t/raspberry-pi-4-32bit-support/355718/36 "2022-05-18T09:13:58Z")

</div>

Hello @maartenc we have been discussing internally and what is happening here is very strange. We do have other fleets running 32 bit containers on 64 bit OS. However in your case, this is not working.

Do you think you can contact with the PlateRecognizer company to understand what is happening inside the pre-built container? Thank you!

[Next page](https://forums.balena.io/t/raspberry-pi-4-32bit-support/355718.md?page=2)
