ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Does everyone use Docker?

asked 2019-09-13 17:13:22 -0500

mugetsu gravatar image

is there an alternative to docker that is less restrictive? Due to how many different tools we use with our ROS robot and the rather unique config we have, it's proven rather cumbersome to setup docker.

Ultimately I am just hoping consolidate dependencies and not have a testbed running slightly different versions. Maybe containers are not the solution here, but is there something else that can get us part of the way there?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2019-09-14 04:57:18 -0500

gvdhoorn gravatar image

updated 2019-09-17 02:34:48 -0500

is there an alternative to docker that is less restrictive?

You could take a look at Singularity. It uses the same underlying technology as Docker, but has a different approach.

Where Docker isolates (almost) everything by default and you must configure it to allow access to certain resources of the host, Singularity only selectively shields containers from the host's resources and you have to configure it to isolate it more. By defeault, Singularity will for instance mount the $USER's $HOME, /dev /tmp and a bunch of other directories. It also allows access to the network by default (similar to Docker 's --net=host), which makes using network applications quite a bit easier. And because of these default binds, using UI applications is essentially a zero-config affair (it typically just works). Access to GPUs is also supported (no need for nvidia-docker).

It also supports importing and running Docker images, so if you are a fan of Docker's way of building images, you could still use that, and then import the resulting image and use it with Singularity.

All of this makes it much easier to use it to only package a deployment and run it on a different host, but also means that it's (somewhat) less isolated from the host. Whether that is something that fits your use-cases is something only you can decide.

Personally, whenever I need to deploy something on a machine where I'm only interested in avoiding "polluting" the host system with all the dependencies of my application, or have nodes that require specific sets of dependencies that are incompatible with the dependencies of other parts of my application, but would still like to run the packaged application(s) almost as-if they were installed on the host, I use Singularity.

With any alternative there are of course some things that seem strange or unexpected compared to Docker (such as read-only containers by default), but most of it is again configurable.

@stevemacenski wrote:

In terms of the restrictiveness of tools, I'd argue Docker is one of the most forgiving.

Singularity might actually be even easier.

I believe packaging entire deployments into single images is not really what Docker was made for, and the default isolation of containers gets in the way of federated development and distributed network applications, requiring the user to poke a lot of holes in it. That's all supported, but it does complicate configuration quite a bit.

Not to say it doesn't have its use-cases, as evidenced by the many companies that use Docker for deployment of their (distributed) applications.

edit flag offensive delete link more

Comments

I've written about Singularity before. See my answer to #q313786 for some example command lines.

"Unfortunately", development of Singularity continues at a high pace, so those exact commands may not work any more with the newest releases, but it should get the idea across.

Another Q&A about Singularity and ROS: #q320755.

gvdhoorn gravatar image gvdhoorn  ( 2019-09-14 04:59:49 -0500 )edit
1

I didn't know about singularity. That's a good looking resource, I'll have to look into it more myself!

stevemacenski gravatar image stevemacenski  ( 2019-09-15 22:54:45 -0500 )edit

i've never heard of singularity before either. It sounds like a better deal than Docker. But, it doesn't look like many ROS users have even heard of it, nor does Singularity cater to ROS users directly.

I'm a little bit hesitant to go this route because of lack of support but will definitely take a look. thanks!

mugetsu gravatar image mugetsu  ( 2019-09-17 14:21:12 -0500 )edit

I'm a little bit hesitant to go this route because of lack of support but will definitely take a look.

I'm not sure what you mean by "lack of support".

Both Docker and Singularity are stand-alone tools with no ROS integration whatsoever. They're both used in countless contexts where ROS does not come into play.

They can both be used to package and deploy ROS applications, but neither Docker nor Singularity will be 'aware' they are packaging something like that (as is the case with any other application that is packaged).

But, it doesn't look like many ROS users have even heard of it,

I would say that would be "their loss" :)

nor does Singularity cater to ROS users directly.

hm, no. Does Docker?

gvdhoorn gravatar image gvdhoorn  ( 2019-09-17 14:23:36 -0500 )edit

Does Docker?

I dont think so, but I know snaps do :-)

stevemacenski gravatar image stevemacenski  ( 2019-09-17 14:29:03 -0500 )edit

You mean there is a tool/extension available that wraps the Catkin build process to produce snaps from Catkin workspaces? I'm not sure you can call that "catering towards ROS".

Bloom can drive debhelper to create .debs from ROS packages. If Bloom's rosdebian generator had been refactored and called dh_catkin, we wouldn't say debhelper "caters to ROS users". It's just a convenience tool that lets you skip a few steps.

gvdhoorn gravatar image gvdhoorn  ( 2019-09-17 14:31:41 -0500 )edit

Sure, that makes sense, but bloom is still a ROS infrastructure tool (in the Ros-infrastrure org), so it naturally caters to ROS users. Canonical has gone out of their way to do special networking stuff to support ROS inside the containers and include the catkin plugin. I would say then that they've gone out of their way to "cater to ROS users".

Anyhow this is semantics. The question wasn't on snaps, I shouldn't have brought it up.

stevemacenski gravatar image stevemacenski  ( 2019-09-17 16:15:52 -0500 )edit
0

answered 2019-09-13 18:04:10 -0500

"Does everyone..." the answer is always no. There's nothing that universally popular other than oxygen and beer.

But to answer the intent, yes alot of people use Docker to deploy production resources, and also for development depending on how much of an isolated sandbox you like. In terms of the restrictiveness of tools, I'd argue Docker is one of the most forgiving. It lets you mount volumes, limit resource utilization, get into the container and mess with stuff manually, etc. The setup phase is pretty easy, but the learning curve to what all the flags you need is a little steep, but its also a one time thing you go through and then know for life.

If you like to live on the edge you can just use the debians from apt, or package up some state of /opt/ros/* and install that across the board for use.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-09-13 17:13:22 -0500

Seen: 705 times

Last updated: Sep 17 '19