Sign inSign up

socialcars/docker

By socialcars

•Updated over 7 years ago

SocialCars Docker Containers

Image
0

4.8K

socialcars/docker repository overview

⁠SocialCars Docker Containers

Docker Pulls Docker Automated build Docker Build Status

This uses an automated build on Dockerhub: https://hub.docker.com/r/socialcars/docker/⁠ so you don't have to build the image for yourself.

⁠socialcars/docker:sumo

A Docker base image for the SUMO⁠ traffic simulation package. SUMO (Simulation of Urban MObility) is an open source, highly portable, microscopic and continuous road traffic simulation package designed to handle large road networks.

⁠Run with Docker

This Dockerfile uses Docker's concept of volumes⁠ where you make one or more folders on your host computer available inside the docker container. The paths of these volumes are specificed in the Dockerfile⁠. In this case, you can make a folder on your host computer available as /data in the Docker container.

For example, if you have your SUMO files stored in the folder /some/local/path/to/your/data on your host computer, you can "mount" this folder as follows: -v /some/local/path/to/your/data:/data. When passing command line arguments to SUMO, use /data instead of the real folder's name on your computer.

This command illustrates this:

docker run --rm -t -i -p 1234:1234 -v /some/local/path/to/your/data:/data socialcars/sumo-docker
⁠Run with CircleCI and Automate Simulation Runs

It is also possible to automate simulation runs by using CircleCI⁠ as an execution engine. The results of the simulation can then be published as a GitHub release.

⁠Example

See masc/sumo-stressgrid⁠. To automate a simulation one could use the following workflow:

  1. Setup CircleCI to build your project.
  2. Develop simulation code in the master branch⁠ until it is mature enough to be used for a simulation.
  3. Fork a new branch, e.g. sim-4x4⁠ to simulate a 4x4 grid or sim-4x6⁠.
  4. Adapt circle.yaml⁠ in that branch to your needs, i.e. add parameters, etc.
  5. Push to repository and let CircleCI run your simulation and publish the results⁠.
⁠Control SUMO via TraCi

Use the following command if you want to control SUMO using the Traffic Control Interface ⁠. This exposes SUMO's features on port 1234 via TCP/IP:

docker run -t -i --rm -p 1234:1234 \
	-v /some/local/path/to/your/data:/data \
	socialcars/sumo-docker \
	-c /data/cologne.sumocfg \
	--remote-port 1234 \
	-v

(remove all \ in the previous example if you use a single line instead of multiple lines)

⁠Java API for TraCI

A Java API for TraCI is available here⁠.

An example application that uses TraCI4J is available here⁠.

⁠Credits

Initially based on work done by pfisterer⁠ and farberg⁠.

⁠socialcars/docker:sumo

Docker container extending socialcars/docker:sumo⁠ with necessary dependencies for running unit-tests and building documentation of SocialCars/colmto⁠.

Tag summary

Content type

Image

Digest

Size

919.4 MB

Last updated

over 7 years ago

docker pull socialcars/docker:colmto