Skip to content

docker_install_tutorial

McCarrin, Michael (CIV) edited this page Jul 21, 2023 · 3 revisions

Install VRX Using a Docker Container

Instead of installing ROS and other dependencies directly on your host machine, you can use a Docker Container to create the environment you need to build and run the VRX simulation platform. To make this easier, we will rely on NPS's dockwater repository, which contains scripts for building a variety of Docker images that include all the dependencies needed for VRX.

Follow the instructions in the linked page from the dockwater Wiki to prepare your system to build the image. This tutorial will guide you through installation of the following tools:

  • Docker: a container management tool
  • Nvidia-toolkit: Nvidia's software for enabling GPU support from Docker images.
  • Rocker: a Docker wrapper that will help build and run your Docker image so it is correctly configured for your local hardware.

Return to this page when finished.

Step 2: Build the Base Image

Next clone the dockwater repository itself:

git clone https://github.com/Field-Robotics-Lab/dockwater.git
cd dockwater

Now build the jammy/humble/garden image:

./build.bash humble

Step 3: Run your container

If successful, the build.bash script will print instructions for running the container. Assuming the default configuration, you should be able to run with the following command:

./run.bash dockwater:humble

The run.bash script will call Rocker to customize your image. The following customizations are included by default:

  • The image will be configured with the same username and uid as your local host, and will mount your home directory so you can work with files in your local host file system.
  • It will also connect to your Nvidia GPU and X windows so you can run Gazebo with accelerated graphics.
  • For a full list of customizations and options available, see the run.bash script.

Once the image has been customized, the script will then launch a container that you will be able to interact with through a bash shell.

  • If successful, you will now have a terminal running a bash shell inside your container (it may look very similar to the terminal you launched from but the prompt will change to reflect the container ID).
  • By working in this container you will be able to install and run VRX following the same instructions as the host-based installation method.

Notes About Working in a Docker Container:

  • Note that changes you make to your container are not persistent by default. Rather, the container is providing a runtime environment that takes care of the dependencies needed to compile and run code that is mounted from your local home directory.
  • If you are using Docker to prepare a submission to the VRX competition, please refer to the VRX Docker Image Creation tutorial sequence
  • We strongly recommend reading through the Docker Overview to familiarize yourself with Docker's concepts and architecture.
Back: Choose Installation Method Top: VRX Tutorials Next: Installing VRX
Clone this wiki locally