Skip to main content
Version: 1.5.0

Compose sessions

Compose sessions are a convenient way of launching multiple containers in a pre-determined way. A compose session is defined by a yaml file, that precribes the containers as service. Each service have the following parameters:

  • source docker image,
  • mounted network volumes,
  • mounted network interfaces,
  • environment variables,
  • network port mapping,
  • entrypoint,
  • base command.

Starting the compose session

docker compose up

When environment variables are provided from a file, start the session as

docker compose --env-file ./stack.env up

Stopping the the session

docker compose down

When environment variables are provided from a file, stop the session as

docker compose --env-file ./stack.env down

Additional arguments:

  • --v, --volumes: remove declared volumes
  • --remove-orphans: remove containers not defined in the compose file

Piping GUI from containers

The following steps apply only for Ubuntu host OS.

  1. mount /dev/dri into the container
volumes:
- /dev/dri:/dev/dri
  1. set the $DISPLAY environment variable:
environment:
DISPLAY: $DISPLAY
  1. run xhost + before starting the compose session

Compose session for the MRS System

The compose sessions are available at the ctu-mrs/mrs_docker.


Vanilla compose sessions

The vanilla compose sessions are compsoe out of:

  • session.yaml: the compose file
  • stack.env: the environment variables definition
  • config/: folder containing the custom configs
  • logs/: folder where stdout logs are going to be stored
  • up.sh, down.sh: scripts for easy starting / stopping of the simulation