From 5b75eb85719cfa2d29d7d54dd1a2d3eaf199b0c1 Mon Sep 17 00:00:00 2001 From: depetrol Date: Thu, 25 Jul 2024 15:31:32 -0700 Subject: [PATCH 1/2] add docker-compose-override docs --- docs/reference/docker-support.mdx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/reference/docker-support.mdx b/docs/reference/docker-support.mdx index 1eb00d569..515967251 100644 --- a/docs/reference/docker-support.mdx +++ b/docs/reference/docker-support.mdx @@ -201,6 +201,21 @@ The default is `"lflang/rti:latest"`, which is available on DockerHub. To instru The value of the `builder-base`, `runner-base`, and `rti-image` entry should follow Docker's `/:` naming convention for image names. Docker will resolve the name and pull the image from your local registry, or, if it cannot be found, from DockerHub. ::: +### Option `docker-compose-override` +If you want to set custom runtime parameters for docker, you can use the `docker-compose-override` option. For example, you can set gpu support, shared memory usage, volume mounts etc. + +```lf-c + docker: { + docker-compose-override: "path/to/docker-compose-override.yml" + } +``` + +The path points to your custom yaml file formatted as a docker-compose file. This file will be used to add to and override the default docker-compose file generated by the compiler following the [docker compose multiple file standard](https://docs.docker.com/reference/cli/docker/compose/). Specifically, the compiler generated docker-compose file and your custom docker compose file will be passed as `-f` parameters to docker compose in order. + +:::tip +The service names of your custom docker-compose file should match the service names of the compiler generated docker-compose file. To be more concrete, add `federate__` prefix to reactor names in federated execution. +::: + ## Manually building and running The generated executable simply invokes `docker compose up --abort-on-container-failure`, but this might not be what you want. Here are some guidelines for building and running manually. If you instead want to build manually after code generation has completed, you can instruct to Lingua Franca compiler to skip building using the `no-build` option in the `docker` target property. More information can be found [here](#option-no-build). From 3cda0a1b474cd3151026f75f2bd87d505490cf75 Mon Sep 17 00:00:00 2001 From: Marten Lohstroh Date: Fri, 2 Aug 2024 20:41:13 -0700 Subject: [PATCH 2/2] Update docs/reference/docker-support.mdx --- docs/reference/docker-support.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/docker-support.mdx b/docs/reference/docker-support.mdx index 515967251..c0b5da000 100644 --- a/docs/reference/docker-support.mdx +++ b/docs/reference/docker-support.mdx @@ -213,7 +213,7 @@ If you want to set custom runtime parameters for docker, you can use the `docker The path points to your custom yaml file formatted as a docker-compose file. This file will be used to add to and override the default docker-compose file generated by the compiler following the [docker compose multiple file standard](https://docs.docker.com/reference/cli/docker/compose/). Specifically, the compiler generated docker-compose file and your custom docker compose file will be passed as `-f` parameters to docker compose in order. :::tip -The service names of your custom docker-compose file should match the service names of the compiler generated docker-compose file. To be more concrete, add `federate__` prefix to reactor names in federated execution. +The service names of your custom docker-compose file should match the service names of the compiler generated docker-compose file. Note that when your program is federated, a `federate__` prefix is used for each service that brings up a federate. For example, if your program has a top-level reactor instance named `a`, then its corresponding service name will be `federate__a`. ::: ## Manually building and running