osrf / docker_images

A repository to hold definitions of docker images maintained by OSRF
Apache License 2.0
527 stars 168 forks source link

Raspberry PI 4b 64-bit OS issues #703

Closed knmcguire closed 5 months ago

knmcguire commented 6 months ago

Hi! I am already planning to install ubuntu on my Raspberry PI 4b already, but before I do that I'd like to notify you of some issues I had trying the ROS docker images on the RPI with the Raspberry Pi OS (the lite version) when I followed this official ROS2 documentation.

First I wanted to grab the prebuild docker images, but when running it I ran into this:

$ docker run -it osrf/ros:humble-desktop-full
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
exec /ros_entrypoint.sh: exec format error

I found this fix that I wanted to try out when building the image source itself, but before I could even try that Iran into the following error when I tried to build the repo (clean so without the fix).

$ docker build -t ros_docker .
[+] Building 0.1s (2/2) FINISHED                                                       docker:default
 => [internal] load build definition from Dockerfile                                             0.0s
 => => transferring dockerfile: 2B                                                               0.0s
 => [internal] load .dockerignore                                                                0.0s
 => => transferring context: 2B                                                                  0.0s
ERROR: failed to solve: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount1556807727/Dockerfile: no such file or directory

Note again, I will install ubuntu on the RPi as this is probably more ideal, but I just wanted to note these issues as these occurred when I was following the steps of the official documentation.

mikaelarguedas commented 6 months ago

Thanks for your feedback.

The support for multiple architectures build is currently only available for the images hosted in the official docker library (the images starting with ros:xxx. You can refer to the architectures section on the README

The build for other platforms is not available on the OSRF profile (thi images with osrf/ros:xxx (so the images that include GUI like desktop and desktop-full), c.f. this section of the README.

Happy containing

mikaelarguedas commented 6 months ago

Regarding the building on RaspberryPi OS, I do not have the hardware to try it out ATM (and I'll be honest I was not aware of these docs section that likely need to be updated).

Could you give a bit mmore details here about how your build went:

Thanks!

knmcguire commented 6 months ago

ah sorry there were some parts that weren't clear in my original post:

mikaelarguedas commented 6 months ago

I wanted to run the ROS-desktop docker image from the official OSRF docker hub on my raspberry PI 4B that is running Raspberry pi OS lite

So you will indeed need to build the image yourself as the desktop image is not part of the official docker library (it is part of the OSRF dockerhub) so it does exist only for amd64 architecture

The errors I mentioned above was before I tried the fix at all, so with the clean clone of the docker_images repo

Got it, and after the fix did you succeed to build or did you have other errors ?

knmcguire commented 6 months ago

1- Got it. That wasn't clear from the documentation indeed. 2- ah no it was the same error, it didn't reach the fix as that was meant for the first error I got which is unrelated as it seems

mikaelarguedas commented 5 months ago

I got my hands on a RaspberryPi 4B and tried this:

And all the images built successfully

knmcguire commented 5 months ago

Hi! The issues I had was with Raspberry Pi OS Lite, not with the Ubuntu desktop image for raspberry pi. I was about to switch to the latter due to the issues I had with the PI OS but wanted to at least report the issues I had with when I followed this part of the documentation step by step.

But it is good to know that it does seem to work on the ubuntu desktop version, which will make it easier for me to justify the switch.

mikaelarguedas commented 5 months ago

Hi! The issues I had was with Raspberry Pi OS Lite,

Note again, I will install ubuntu on the RPi as this is probably more ideal

It was mostly to let you know that you will likely not face that issue on Ubuntu

knmcguire commented 5 months ago

Ah oke! Thanks for that 😄 I'll be picking it up soon now I'm back from the holidays.

mikaelarguedas commented 5 months ago

Today I tried on RaspberryPi OS:

sudo apt update && sudo apt install -y git
cd /tmp
git clone https://github.com/osrf/docker_images
cd docker_images/ros/humble/ubuntu/jammy/

Edit the Makefile to uncomment the docker build commands for desktop and destkop full

sudo make build

It built all docker images successfully and I could run them and launch a talker listener demo

mikaelarguedas commented 5 months ago

Same result with the lite version of raspbian 12.

I could build and run images without issue.

Waiting to get more feedback on this issue but if none provided in the coming weeks I'm inclined to close this

knmcguire commented 5 months ago

Ah okay, thanks that you have checked raspbians as well. Since I've already moved to Ubuntu 22.04 and used up my last SD card for that. I'll try to find a reserve but since it seems I'll be busier than planned and traveling the coming weeks to test this, it is fine if you'd close this. You have tested it with raspbian 12 both versions also on a raspberry pi 4b and weren't able to recreate my situation. Since no-one has come forward with the same problem there is probably not a high risk in that. Most likely next time I try it it should work for me as well I'm sure

Thanks again for your help of testing this out.

mikaelarguedas commented 5 months ago

Closing for now, dont hesitate to comment if you face this issue and we can reopen