[ros-users] Givving ROS an Official DockerHub Image

Ruffin White roxfoxpox at gmail.com
Sun Feb 8 00:35:10 UTC 2015

I made a quick video showing gazebo and rviz running inside docker.
Check it out if your interested:
The video shows some flickering with unity,
but that's just a bug between SimpleScreenRecorder and nvidia's flip
setting, it never shows on my display.


On Sat, Feb 7, 2015 at 4:27 AM, Ruffin White <roxfoxpox at gmail.com> wrote:

> Awesome,
> I should have known you'd already added this tool to your toolbox.
> @William
> Docker can defiantly be useful for end users who what or need to use
> graphical interfaces.
> In fact that was one of the points I spent most of my time getting nailed
> down before I decided I'd approach the community as I wanted a proof of
> concept working first. If you take I look at my Dockerfile setup
> <https://github.com/CognitiveRobotics/omnimapper/tree/master/docker>, I
> followed OpenCog's approach, and built up a series of base images for our
> project ranging from a simple ros desktop install all the way to a
> functional GUI demo app, with a few degrees in between depending on whats
> only required for my lab mates to develop in.
> The last bit in getting the x-server to play nice with my container was a
> bit tricky, but its not hard to implement once you've got a solution. I
> remember playing with docker-desktop, but I was a little disappointed with
> the frame-rates using x11 forwarding over an ssh tunnel, especially  for
> stuff like video, 3D GUI apps or any other bandwidth intensive display
> scenarios. So I tried a different approach, similar to docker-browser-box
> <https://github.com/sameersbn/docker-browser-box>, where instead of
> piping the display over a network I could mount my host's xserver unix
> socket to the container directly instead. I also have PulseAudio working
> with this, not that my ros app uses it now, but I'm sure others certainty
> do.
> From there you can also give the container access to graphical hardware
> acceleration, so with a short start up script
> <https://github.com/CognitiveRobotics/omnimapper/blob/master/docker/nvidia/run.sh>,
> you can have gazebo using the Nvidia driver in the container to accesses
> the Nvidia driver of the host, to use the GPU for all of the OpenGL
> rendering. So with this, I can get the same FPS in the container as would
> if I ran the instructions on my host's shell. This allows me to play around
> with newer versions of gazebo without constantly breaking my host's stable
> development environment. I think I have this working for Intel's HD
> graphics as we'll, so I'll have push that Dockerfile and script. Maybe I
> could post a youtube video of an example.
> @Tully
> Although I've gotten my lab's project working under an automated build
> setup now, such that when I push new commits to the project's public
> release repo, the web-hook for the dockerhub registry triggers, and the
> image(s) are rebuilt using the newest source/packages, the same posses for
> official repos looks to be a bit more involved. But there seems to be a
> tool called Bashbrew
> <https://github.com/docker-library/official-images/blob/master/bashbrew/README.md>
> for automating the process.
> As an aside: I think the minimum naming isn't an issue for official repo
> names, as they are not tagged under any user, e.x. the official PHP repo is
> simply "php", so a repo name like "ros" should be fine there.
> I agree rosdistro is probably too busy, as it might cause some trouble
> with all the web-hooks poking about. Could we make a new repo under ros
> specific to just Dockerfiles, duly named "docker"?
> Here is the list of images I had in mind so far:
> https://github.com/ruffsl/docs/tree/master/ros
> Ruffin
> On Sat, Feb 7, 2015 at 12:58 AM, Tully Foote <tfoote at osrfoundation.org>
> wrote:
>> Hi Ruffin,
>> I think there would definitely be intest in making an official ROS repo
>> on Docker Hub. Docker does provide a nice platform for making reproducible
>> environments. We've been using it heavily in our next generation of the ROS
>> buildfarm. [1]
>> There's a minimum organization length so we've been using an osrf
>> organization for our recent use. [2]
>> In the new buildfarm work we have the ability to generate Dockerfiles for
>> arbitrary combinations of ROS packages, arches, and distributions. I think
>> leveraging that capability such that we can maintain the many Dockerfiles
>> we would need. From that we can clean it up and make sure we meet all the
>> requirements for an Official Repository. With the number of Dockerfiles we
>> will need we should not be maintaining them manually and I'd suggest we
>> setup a parallel repository into which we can generate the Dockerfiles for
>> Dockerhub to pick up. The rosdistro repo is already super busy.
>> Tully
>> [1] http://wiki.ros.org/buildfarm
>> [2] https://registry.hub.docker.com/repos/osrf/
>> On Fri, Feb 6, 2015 at 8:50 PM, Ruffin White <roxfoxpox at gmail.com> wrote:
>>> Hello everyone,
>>> I wanted to ask the community and the admins if there would be any
>>> interest in making an official ROS repo for the Docker Hub Registry
>>> <https://registry.hub.docker.com/>?
>>> I've been using ROS with Docker <https://www.docker.com/> for a while
>>> now, and I've found it really helpful for my ROS projects. Learning how to
>>> use Linux containers takes a bit of a learning curve but once you get a
>>> hang of it, its like you can't stop thinking inside the container
>>> <http://en.wikipedia.org/wiki/Thinking_outside_the_box>.
>>> So I've been using it as development environment tool as well as a
>>> platform for sharing working demos, as well as the a perfect tool for
>>> deploying apps to robots. For one of my research lab's projects,
>>> OmniMapper
>>> <http://www.cogrob.org/2014/05/omnimapper-modular-multimodal-mapping-framework/>, I've
>>> been documenting my progress in our github wiki pages. I made a docker
>>> image for the demo, allowing novices users to skip much of the tedious
>>> build and dependency processes, and get straight to running and playing
>>> with the project, as I explain in this tutorial
>>> <https://github.com/CognitiveRobotics/omnimapper/wiki/Tutorial-%7C-OmniMapper-&-Docker>
>>> .
>>> I have to say, I'm not the first to do this, it seem to be trending here
>>> and there, so just to cite a few:
>>>    - Gernot Klingler <http://gernotklingler.com/blog/> and his a
>>>    detailed post: How docker replaced my virtual machines and chroots
>>>    <http://gernotklingler.com/blog/docker-replaced-virtual-machines-chroots/>,
>>>    a guide in how to enable a container to connect to an x-server and
>>>    graphical hardware acceleration.
>>>    - opencog <https://github.com/opencog> with examples
>>>    <https://github.com/opencog/ros> in the use of Docker for research
>>>    and collaboration within the robotics community.
>>>    - quantumobject / docker-ros-base
>>>    <https://registry.hub.docker.com/u/quantumobject/docker-ros-base/>
>>> This sort of reminds me how I got into using ROS when first playing with
>>> it in virtual machines, like these ones
>>> <http://nootrix.com/2014/09/ros-indigo-virtual-machine/>, way back
>>> when. But know I can get bare metal performance, mount any arbitrary
>>> directories or hardware from my host, and keep my images tiny on disk.
>>> Plus, I get to pick any modern Linux distro to use as a host, not just
>>> Ubuntu.
>>> So I've followed the Guidelines for Creating and Documenting Official
>>> Repositories <https://docs.docker.com/docker-hub/official_repos/>, and
>>> have a few proposed images for both Indigo and Hydro. I have a fork of
>>> rosdistro <https://github.com/ruffsl/rosdistro> with the necessary
>>> Dockerfiles (just my first though on where to pull request them into), and
>>> a fork of docker-library/docs <https://github.com/ruffsl/docs> with the
>>> appropriate entry for ROS image conforming to the registry's standards.
>>> I can contact the Docker Hub admins to get the project added, I just
>>> wanted to get in touch with the admins first and get the community's
>>> blessing.
>>> Feedback welcome!
>>> Ruffin
>>> _______________________________________________
>>> ros-users mailing list
>>> ros-users at lists.ros.org
>>> http://lists.ros.org/mailman/listinfo/ros-users
>> _______________________________________________
>> ros-users mailing list
>> ros-users at lists.ros.org
>> http://lists.ros.org/mailman/listinfo/ros-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20150207/e155a8a2/attachment.html>

More information about the ros-users mailing list