Documented custom docker-compose extentions
Build Docs / build (push) Failing after 46s
Details
Build Docs / build (push) Failing after 46s
Details
This commit is contained in:
parent
e1ecb7538c
commit
b07870936c
19
README.md
19
README.md
|
@ -36,6 +36,25 @@ ROS1 is considered end of life. It's recomended to use a ROS2 template instead
|
|||
|
||||
We're working on it...
|
||||
|
||||
## Special docker options
|
||||
|
||||
We support the following special docker options to make metadata available inside the SDK
|
||||
|
||||
* x-spiri-sdk-doc: ""
|
||||
|
||||
This will appear as a comment when creating a new robot
|
||||
|
||||
* x-spiri-sdk-default-enabled: true
|
||||
|
||||
Set this to false and that docker compose will be commented out by default when creating a new robot
|
||||
|
||||
* x-spiri-sdk-default-args: ""
|
||||
|
||||
Extra arguments to pass to docker compose. Should accept all docker compose arguments.
|
||||
|
||||
Common options would be `--build`. You might also appreciate `--pull ("always"|"missing"|"never")`.
|
||||
|
||||
|
||||
## NVIDIA Container Toolkit
|
||||
|
||||
[Source](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html)
|
||||
|
|
|
@ -133,11 +133,16 @@ class Spirimu(Robot):
|
|||
default_robot_compose += f"#{compose_file} not valid \n"
|
||||
continue
|
||||
specialArgs = data.get("x-spiri-sdk-default-args", "")
|
||||
enabled = str(data.get("x-spiri-sdk-default-enabled", True))
|
||||
enabled = enabled.lower() in ["true", "yes", "1"]
|
||||
|
||||
docstring = data.get("x-spiri-sdk-doc", "")
|
||||
if docstring:
|
||||
for line in docstring.split("\n"):
|
||||
if line:
|
||||
default_robot_compose += f"# {line}\n"
|
||||
if not enabled:
|
||||
default_robot_compose += "##"
|
||||
default_robot_compose += f"{compose_file} {specialArgs}\n"
|
||||
|
||||
ui.label("Compose files").classes("text-xl")
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
x-spiri-sdk-doc: Capture camera images for mapping
|
||||
x-spiri-sdk-default-enabled: false
|
||||
|
||||
services:
|
||||
camera-capture:
|
||||
|
|
Loading…
Reference in New Issue