Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docker support #2

Open
wants to merge 1 commit into
base: crowdbot
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.git
Dockerfile
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Use Ubuntu 20.04 as base image
FROM ubuntu:20.04

# Copy source files to directory
COPY . .

# Install dependency
RUN apt update && \
DEBIAN_FRONTEND=noninteractive apt install libsdl2-dev cmake g++ make -y

# Build recipe
RUN cd RVO2 && \
mkdir build && \
cd build && \
cmake .. && \
make && \
make install && \
cd ../../rds && \
make
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ The software's structure is as in the following picture.

Instructions follow to set up and run RDS and some demos in Ubuntu 16.04. Below, the first section is for simulations, and the second section is for the ROS interface. First, the following steps are necessary in both cases.

You can use docker to build and execute RDS following [this guide](docs/docker.md).

This installs the graphics library SDL2, which is a prerequisite.

```
Expand Down Expand Up @@ -164,4 +166,4 @@ The boolean parameter ORCA_implementation specifies whether to use an implementa

The response's parameter corrected_command reports the command which RDS has computed.

The response's parameter call_counter simply counts how often the service of the rds_ros_node has been called since the node was launched.
The response's parameter call_counter simply counts how often the service of the rds_ros_node has been called since the node was launched.
33 changes: 33 additions & 0 deletions docs/docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Using Docker to run RDS

Follow this guide to run RDS on docker.

## Requirements

The only dependency that you should install is the standard Docker Engine:

- Install Docker Engine: https://docs.docker.com/engine/install/

## Build local docker image
```
docker build -t rds:latest .
```

## Run

Once the docker image is built, you can run the software using the following:

```
docker run -i -w <DIRECTORY> rds:latest <COMMAND>
```

where:
- `<DIRECTORY>` is the base directory to execute the command
- `<COMMAND>` is the executable string

For example, to run the simulation, located on `/rds`:

```
docker run -i -w /rds rds:latest ./build/baseline_crowd_rds_5 7
```