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.
- Ubuntu
- mount
/dev/dri
into the container
volumes:
- /dev/dri:/dev/dri
- set the
$DISPLAY
environment variable:
environment:
DISPLAY: $DISPLAY
- 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 filestack.env
: the environment variables definitionconfig/
: folder containing the custom configslogs/
: folder where stdout logs are going to be storedup.sh
,down.sh
: scripts for easy starting / stopping of the simulation