Docker Usage - RoBorregos/robocup-home GitHub Wiki

Docker Setup

Requirements

  • Ubuntu System

  • Docker

  • Nvidia Support Installation (Optional, Rviz & Gazebo could also run with Intel Integrated Graphics Card):

    distribution=$(. /etc/os-release;echo $ID$VERSION_ID)    && curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -    && curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
    sudo apt-get update
    sudo apt-get install -y nvidia-docker2
    sudo systemctl restart docker
    

    Reference

  • Github Repository

Dockerfiles

All dockerfiles are under the folder docker/[ros-distro]. There is a Dockerfile per area and a general one with just the ros-distro installation.

Areas currently supporting Docker Usage:

  • Speech
  • Object Detection
  • Base Control using Rviz

How to run?

A Makefile was created with all the necessary docker commands:

Setup

Build Docker Image and create Docker Container.

1-.

    sudo make noetic.build

2-.

  • Create with Nvidia Support
    sudo make noetic.create.nvidia
  • Or create with Intel Support (When there's not nvidia GPU)
    sudo make noetic.create.intel
  • Or create without any gpu (Rviz & Gazebo will not work)
    sudo make noetic.create

If you get something like this when running step 2 commands

make: execvp: ./docker/run_scripts/run.bash: Permission denied
make: *** [Makefile:14: noetic.nvidia.create] Error 127

Try running the following command

chmod +x ./docker/run_scripts/*

Run

1-.

  • Run container
    sudo make noetic.up
    sudo make noetic.shell

Stop

  • Stop container
    sudo make noetic.down

Helpful Commands

Once running, inside the container run terminator to use several terminals.

    terminator -u

Show a list of all existing containers.

    sudo make list

Show a list of all running containers.

    sudo make listUp

** For further reference to the commands per area, open the Makefile that is at the root.