[Discourse.ros.org] [General] Announcing ROS Docker Images for ARM and Debian

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [General] Announcing ROS Docker Images for ARM and Debian

Tully Foote via ros-users


**TL;DR**: Support for both ARM and Debian with ROS is now reflected in the Official DockerHub library! :whale:

Hello everyone!

As you might have noticed, DockerHub is beginning to support additional architectures other than amd64 [1]. So I've expanded upon our dockerfile maintenance infrastructure for the official ROS images to enable arm support.

Additionally while refactoring, support for multiple operating systems, i.e. debian based  ROS images, has also been enabled, while also extending to supported arm architectures. To see the listing of supported suites, distros and architectures for the official DockerHub library, you can view the manifest for ROS here [2]:

https://github.com/docker-library/official-images/blob/master/library/ros

### Notes:
* New tags have been added to specify the operating system suite via appended suffix
  * E.g. `kinetic-ros-base-xenial`, `kinetic-ros-base-jessie`
* There are no changes to the original set of tags, as they still point to the same suite
  * E.g. `kinetic` <=> `kinetic-ros-base` <=> `kinetic-ros-base-xenial`
  * Additionally true for `amd64` tagged images hosted from osrf/ros automated repo
* **Presently**, the multi-architecture ROS images are hosted under separate docker hub organizations
  * E.g. `docker pull arm64v8/ros` OR `docker pull arm32v7/ros:indigo`
  * You may reference `<arch>/ros:<tag>` to specifically pull a given architecture
  * OR try out the ***temporary*** manifest enabled test rolling repo: `docker pull trollin/ros`
* **Forthcoming**, the official registry will internally negotiate what arch is pulled via the manifest
  * E.g. if docker-engine host is `arm64v8`, `docker pull ros` should pull an `arm64v8` image
* There is some build scaffolding you can follow for multi-architecture image builds for ROS
  * E.g. [arm32v7/job/ros](https://doi-janky.infosiftr.net/job/multiarch/job/arm32v7/job/ros/), [arm64v8/job/ros](https://doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/ros/)

This is all fairly new, so if you'd like to start learning more, here's a relatively recent article on the subject [3]:
https://developer.ibm.com/linuxonpower/2017/07/27/create-multi-architecture-docker-image/

Of course, if you'd like to play around with any of the arm images, but don't have raspberry pie or other arm based platform laying around, you can easily emulate via qemu-user and binfmt-support. By mounting in the necessary qemu-user static binaries into the container, and installing the necessary binfmt-support kernel module to the host, you can run commands within the arm environment on your `amd64` workstation.

E.g. a small script, such as in `cross-docker` for example [4], can be used like so:

``` terminal
$ sudo apt install qemu-user-static
...

$ uname -a
Linux ubuntu 4.8.0-58-generic #63~16.04.1-Ubuntu SMP
 Mon Jun 26 18:08:51 UTC 2017
 x86_64 x86_64 x86_64 GNU/Linux

$ ./cross-docker run -it arm64v8/ros:lunar-ros-core-stretch uname -a
Unable to find image 'arm64v8/ros:lunar-ros-core-stretch' locally
lunar-ros-core-stretch: Pulling from arm64v8/ros
774bc81cd4dd: Pull complete
...
Digest: sha256:dd88dce3f840cc963a61881a1da4f36f1c66214dd1b0029fa433580a4f5a142f
Status: Downloaded newer image for arm64v8/ros:lunar-ros-core-stretch
Linux a2a63cc39389 4.8.0-58-generic #63~16.04.1-Ubuntu SMP
 Mon Jun 26 18:08:51 UTC 2017
 aarch64 GNU/Linux

$ ./cross-docker run -it arm64v8/ros:lunar-ros-core-stretch cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
...
```

If you find issues with the images, please be sure to ticket them here [5]:
https://github.com/osrf/docker_images

Also don't forget to share our official repo [6] so others might discover it!

best,
@ruffsl

[1] https://github.com/docker-library/official-images#architectures-other-than-amd64
[2] https://github.com/docker-library/official-images/blob/master/library/ros
[3] https://developer.ibm.com/linuxonpower/2017/07/27/create-multi-architecture-docker-image/
[4] https://github.com/justincormack/cross-docker , https://docs.docker.com/docker-for-mac/multi-arch/
[5] https://github.com/osrf/docker_images
[6] https://hub.docker.com/_/ros/


### P.S.
For `arm32v7`, there is a blocking issue upstream with cloud image used in docker hub. If you would like to expedite `arm32v7` support for ROS docker images, you may make your concerns know and follow the bug report:
https://bugs.launchpad.net/cloud-images/+bug/1711735

Although some `i386` binaries are supplied by the ROS buildfarm, I've deliberately omitted it for now, given:
1. `i386` binaries for docker-engine are not officially shipped or supported by Docker
2. Current traffic for `i386` ROS packages is below that for arm





---
[Visit Topic](https://discourse.ros.org/t/announcing-ros-docker-images-for-arm-and-debian/2467/1) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [General] Announcing ROS Docker Images for ARM and Debian

Tully Foote via ros-users


Very nice!
We've been successfully using ARM docker images for ROS in our CI setup for a over a year now and it really makes things a lot easier.
We also included the static qemu binaries in our ARM images to make it easier to run them on our amd64 machines for testing. Is there any plan to also include qemu in the official images?





---
[Visit Topic](https://discourse.ros.org/t/announcing-ros-docker-images-for-arm-and-debian/2467/2) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [General] Announcing ROS Docker Images for ARM and Debian

Tully Foote via ros-users
In reply to this post by Tully Foote via ros-users


[quote="ruffsl, post:1, topic:2467"]
By mounting in the necessary qemu-user static binaries into the container, and installing the necessary binfmt-support kernel module to the host
[/quote]

[quote="flixr, post:2, topic:2467"]
We also included the static qemu binaries in our ARM images to make it easier to run them on our amd64 machines for testing. Is there any plan to also include qemu in the official images?
[/quote]

I would vote against this. Instruction translation is built in for Docker CE in (recent versions of) Linux, Mac, and Windows 10 Pro. Rather than include them by default, and push the additional bloat penalty onto users who might not need it, it'd be more important to me to keep the images small without me having to remember to remove these binaries before deployment.





---
[Visit Topic](https://discourse.ros.org/t/announcing-ros-docker-images-for-arm-and-debian/2467/3) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [General] Announcing ROS Docker Images for ARM and Debian

Tully Foote via ros-users
In reply to this post by Tully Foote via ros-users


[quote="flixr, post:2, topic:2467"]
Is there any plan to also include qemu in the official images?
[/quote]

Hmm, a convenient idea at first, but just like the Official Ubuntu or Debian images that serve as the base images for ROS, our ROS images similarly serve as a primary starting platform for many application, be it continuous integration or target deployment, etc. I would concur with @computermouth that including qemu into the official ROS images may be too much of a niche use case to justify the larger base image size that would require additional bandwidth when shipping and storage from resource constrained embedded targets. Additionally, the current multi-arch generator setup is such that the dockerfiles themselves are designed to be architecture agnostic, keeping it simple to add support for future platforms as they emerge. Necessitating platform specific alterations would complicate mainece a bit.

[quote="computermouth, post:3, topic:2467"]
Instruction translation is built in for Docker CE in (recent versions of) Linux
[/quote]

I didn't yet reference this given some issues related to this capability on ubuntu and debian [1], and so instead opted for giving a legacy example of mounting the files I know works currently. However, I suspect once some additional issues [2,3] (thanks for starting those by the way, @computermouth) have been patched upstream, then mounting or baking qemu files inside the image should no longer be necessary. Testing with my latest apt sources still failes, but please report back @computermouth when those patches make into debian and ubuntu release.
 
[1] https://github.com/docker/for-linux/issues/56
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=868217
[3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=868030





---
[Visit Topic](https://discourse.ros.org/t/announcing-ros-docker-images-for-arm-and-debian/2467/4) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [General] Announcing ROS Docker Images for ARM and Debian

Tully Foote via ros-users
In reply to this post by Tully Foote via ros-users


[quote="ruffsl, post:4, topic:2467"]
[1] https://github.com/docker/for-linux/issues/56
[/quote]

Tis I, computermouth! The bummer is that it's a problem Debian and Ubuntu's distribution of the qemu binaries (rather some supporting files I've backed up here: https://github.com/computermouth/qemu-static-conf)

However, it does work out of the box with the latest Fedora. So I assume it's something coming down the pipe in the qemu dists. And any decisions in the design of your containers should keep that in mind.





---
[Visit Topic](https://discourse.ros.org/t/announcing-ros-docker-images-for-arm-and-debian/2467/5) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [General] Announcing ROS Docker Images for ARM and Debian

Tully Foote via ros-users
In reply to this post by Tully Foote via ros-users


[quote="computermouth, post:5, topic:2467"]
The bummer is that its a problem Debian and Ubuntus distribution of the qemu binaries (rather some supporting files Ive backed up here: https://github.com/computermouth/qemu-static-conf)
[/quote]

Hmm. I like the current working solution you have written on your repo more than suggesting folks to mount qemu files (as done with cross-docker [1]). It also simplifies the building dockerfiles from images of other architectures as well. I have updated the original post to reflect this interim solution in anticipation of `--fix-binary` flag option added into binfmt-support for debian.

[1] https://github.com/justincormack/cross-docker





---
[Visit Topic](https://discourse.ros.org/t/announcing-ros-docker-images-for-arm-and-debian/2467/6) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|

[Discourse.ros.org] [General] Announcing ROS Docker Images for ARM and Debian

Tully Foote via ros-users
In reply to this post by Tully Foote via ros-users


### Update:
arm32v7 images for kinetic and lunar have now just released. Although the upstream issues with ubuntu's cloud image for trusty remains [1], blocking older ROS distro tags that target 14.04 such as indigo, you can still at least use the latest LTS for ROS on your older arm targets, e.g Raspberry Pi 2.

```
$ docker run -it arm32v7/ros uname -a
Unable to find image 'arm32v7/ros:latest' locally
latest: Pulling from arm32v7/ros
93170abd0836: Pull complete
...
Digest: sha256:8cac76fded9e3393bcf6c5605e074829780d1ad58029a0b1f58fd9a3ec23862c
Status: Downloaded newer image for arm32v7/ros:latest
Linux 4ed135bbaf79 4.11.3-041103-generic #201705251233 SMP
 Thu May 25 16:34:52 UTC 2017
 armv7l armv7l armv7l GNU/Linux
```

Additionally, the official docker library now natively support manifest lists [2]! So instead of previously: `docker pull trollin/ros`, you should now simply be able to: `docker pull ros` to download the same image architecture as is your docker host system. Although should you need to pull a foreign architecture, you can still do so by specifying as such the repo path: `docker pull arm32v7/ros`.

https://github.com/docker-library/official-images/issues/2289

[1] https://bugs.launchpad.net/cloud-images/+bug/1711735
[2] https://github.com/docker-library/official-images/issues/2289





---
[Visit Topic](https://discourse.ros.org/t/announcing-ros-docker-images-for-arm-and-debian/2467/7) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>