Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds instructions to build a docker image in an x86/x64 architecture for arm64/v8 #202

Closed
wants to merge 1 commit into from

Conversation

agalbachicar
Copy link
Member

🎉 New feature

Part of #200

Summary

Povides a dockerized container to run in arm64/v8.
This is by no means a definite solution, given that it is presented as a self-contained docker image which packs the current state of the repository, builds and tests it, which isn't great for development. It is not great for staged versions either given that we have a plethora of unnecessary dependencies and the port / driver configurations are not included in this image.

It should help to foster the discussion and #200 by providing a baseline that works.

Test it

Followed the readme instructions in my laptop, connected the RPI to the camera, the lidar and the arduino uno. As a base system I had the system fully installed as the readme says, so all the port configuration was already there. After launching the container, I ran the following:

ros2 launch andino_bringup andino_robot.launch.py

I could see an error with the camera, different to #198 but probably related and just twisted because of the docker configuration. After setting the ROS_DOMAIN_ID, I could see with rqt_gui different topic information and similarly a partial visualization with RViz.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if it affects the public API)

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

…for arm64/v8 and avoid installing everything in the RPI.

Signed-off-by: Agustin Alba Chicar <[email protected]>
@agalbachicar
Copy link
Member Author

I think this is good starting point for solving many points here:

Then, about the docker for arm64/v8:

  • I think this may help to test certain packages in CI.
  • we can edit this image to have a base development image.
  • requirements.txt are shared, but perhaps if we want to distribute docker images with the running stack we just need a subset of runtime dependencies instead of development dependencies.
  • many other things...

Copy link
Contributor

@JesusSilvaUtrera JesusSilvaUtrera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just leaving a comment because I have tried to build the image and see if it was working fine for me and it failed (maybe it is a misconfiguration in my machine)

# Adds USER to dialout and plugdev group.
# This is needed to access the serial ports, for further references check
# the libserial documentation.
RUN sudo usermod -a -G dialout $USER
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It fails here for me:

 => ERROR [base 10/16] RUN sudo usermod -a -G dialout jesus-silva                                                                                                                                       0.2s
------
 > [base 10/16] RUN sudo usermod -a -G dialout jesus-silva:
0.179 sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?
------
Dockerfile.arm64:27
--------------------
  25 |     # This is needed to access the serial ports, for further references check
  26 |     # the libserial documentation.
  27 | >>> RUN sudo usermod -a -G dialout $USER
  28 |     RUN sudo usermod -a -G plugdev $USER
  29 |     
--------------------
ERROR: failed to solve: process "/dev/.buildkit_qemu_emulator /bin/sh -c sudo usermod -a -G dialout $USER" did not complete successfully: exit code: 1

What I usually do with this type of errors is to change the user later, so I don't need to use sudo on the commands.

@jballoffet
Copy link
Member

Thanks @agalbachicar for sharing this, it is really helpful. I'm closing the PR until this can be tackled up but leaving the proposed changed on the branch so it can be resumed in the near future. Thank you!

@jballoffet jballoffet closed this Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants