Skip to content

Containerised SUMO. Use sumo, sumo-gui and TraCI with Docker. 🐳 🚗

Notifications You must be signed in to change notification settings

bogaotory/docker-sumo

Repository files navigation

docker-sumo

Join the chat at https://gitter.im/docker-sumo/Lobby

Build Status

Containerised SUMO.

SUMO (Simulation of Urban MObility), an open-source traffic simulation software, is dockeried by the Dockerfile included in this repository. This image uses Ubuntu version 16.04 and contains version 0.31.0 of SUMO.

sumo, sumo-gui and TraCI are all accessible with this image.

See sumo-gui in action:

demo sumo and sumo-gui in docker

See TraCI in action:

demo TraCI and sumo-gui in docker

Usage (Option 1) - Build from Ubuntu image (Recommended)

  1. Change your_username (line 8 of Dockerfile) to your username (i.e. the output of echo "$USER")
  2. Build the image with docker build - < Dockerfile -t docker-sumo
  3. Run the image with
docker run -it --rm\
    --env="DISPLAY" \
    --volume="/etc/group:/etc/group:ro" \
    --volume="/etc/passwd:/etc/passwd:ro" \
    --volume="/etc/shadow:/etc/shadow:ro" \
    --volume="/etc/sudoers.d:/etc/sudoers.d:ro" \
    --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
    --user=$USER \
    docker-sumo \
    bash
  1. Execute sumo or sumo-gui as usual.

Usage (Option 2) - Build from bogaotory/sumo:0.30.0

  1. Prepare your own Dockerfile with your username (i.e. the output of echo "$USER"):
FROM bogaotory/sumo:0.30.0

RUN adduser your_username --disabled-password
  1. Build the image with docker build - < Dockerfile -t docker-sumo
  2. Run the image with
docker run -it --rm\
    --env="DISPLAY" \
    --volume="/etc/group:/etc/group:ro" \
    --volume="/etc/passwd:/etc/passwd:ro" \
    --volume="/etc/shadow:/etc/shadow:ro" \
    --volume="/etc/sudoers.d:/etc/sudoers.d:ro" \
    --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \
    --user=$USER \
    docker-sumo \
    bash
  1. Execute sumo or sumo-gui as usual.

Additional Dependencies

proj and gdal are required for users of OpenStreetMap.

References

I referenced a couple of past attempts of dockerising SUMO:

Neither gives a straightforward containerised SUMO solution.

The method for GUI access is borrowed from this post.

About

Containerised SUMO. Use sumo, sumo-gui and TraCI with Docker. 🐳 🚗

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published