Added flag for enabling nvidia gpu
This commit is contained in:
parent
a60a1784f7
commit
f0fce2dc54
@ -24,6 +24,11 @@ LANGUAGES:
|
|||||||
|
|
||||||
RUN_COMMAND: rosrun {{ PACKAGE_NAME }} {{ "main.py" if 'Python' in LANGUAGES else "main" if "CPP" in LANGUAGES else "yourcommandGoes here" }}
|
RUN_COMMAND: rosrun {{ PACKAGE_NAME }} {{ "main.py" if 'Python' in LANGUAGES else "main" if "CPP" in LANGUAGES else "yourcommandGoes here" }}
|
||||||
|
|
||||||
|
ENABLE_NVIDIA_GPU:
|
||||||
|
default: False
|
||||||
|
type: bool
|
||||||
|
help: Enabling nvidia gpus make deployment much more complicated. Ensure you have the nvidia container toolkit working properly.
|
||||||
|
|
||||||
HEALTHCHECK:
|
HEALTHCHECK:
|
||||||
defualt: --start-period=60s --start-interval=1s CMD /ros_entrypoint.sh rostopic list
|
defualt: --start-period=60s --start-interval=1s CMD /ros_entrypoint.sh rostopic list
|
||||||
type: str
|
type: str
|
||||||
|
@ -19,6 +19,15 @@ services:
|
|||||||
nofile:
|
nofile:
|
||||||
soft: 1024
|
soft: 1024
|
||||||
hard: 524288
|
hard: 524288
|
||||||
|
{% if ENABLE_GPU %}
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
reservations:
|
||||||
|
devices:
|
||||||
|
- driver: cdi
|
||||||
|
device_ids:
|
||||||
|
- nvidia.com/gpu=all
|
||||||
|
{{% endif %}
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
sdk:
|
sdk:
|
||||||
|
Loading…
Reference in New Issue
Block a user