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:
See TraCI
in action:
- Change
your_username
(line 8 ofDockerfile
) to your username (i.e. the output ofecho "$USER"
) - Build the image with
docker build - < Dockerfile -t docker-sumo
- 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
- Execute
sumo
orsumo-gui
as usual.
- Prepare your own
Dockerfile
with your username (i.e. the output ofecho "$USER"
):
FROM bogaotory/sumo:0.30.0
RUN adduser your_username --disabled-password
- Build the image with
docker build - < Dockerfile -t docker-sumo
- 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
- Execute
sumo
orsumo-gui
as usual.
proj and gdal are required for users of OpenStreetMap.
I referenced a couple of past attempts of dockerising SUMO:
- https://github.com/radiganm/dockerhub, which insists on compiling everything from source
- https://github.com/similitude/sumo-docker, based on Maven and emphasises on the inclusion of
TraCI4J
which is not necessarily useful for beginners of SUMO.
Neither gives a straightforward containerised SUMO solution.
The method for GUI access is borrowed from this post.