More cleanup and user friendlieness tweaks

This commit is contained in:
Alex Davies 2024-09-19 11:31:49 -03:00
parent f0fce2dc54
commit 5792496ab2
3 changed files with 14 additions and 6 deletions

View File

@ -27,9 +27,15 @@ RUN_COMMAND: rosrun {{ PACKAGE_NAME }} {{ "main.py" if 'Python' in LANGUAGES els
ENABLE_NVIDIA_GPU: ENABLE_NVIDIA_GPU:
default: False default: False
type: bool type: bool
help: Enabling nvidia gpus make deployment much more complicated. Ensure you have the nvidia container toolkit working properly. help: |
ENABLE_NVIDIA_GPU
Enabling nvidia gpus make deployment much more complicated.
Ensure you have the nvidia container toolkit installed and
working properly.
HEALTHCHECK: HEALTHCHECK:
defualt: --start-period=60s --start-interval=1s CMD /ros_entrypoint.sh rostopic list defualt: HEALTHCHECK --start-period=60s --start-interval=1s CMD /ros_entrypoint.sh rostopic list
type: str type: str
help: It's important to have a good health check. This health check just sees if we can talk to the ROS master help: |
Set a health check.
This stub health check just sees if we can talk to the ROS master

View File

@ -14,7 +14,9 @@ WORKDIR /root/catkin_ws/src
COPY ./ {{PACKAGE_NAME}} COPY ./ {{PACKAGE_NAME}}
RUN apt-get clean RUN apt-get clean
HEALTHCHECK {{HEALTHCHECK}}
#Don't forget to set a healthcheck for your container!
{{HEALTHCHECK}}
# Command to run your application # Command to run your application
CMD {{RUN_COMMAND}} --wait --screen CMD {{RUN_COMMAND}} --wait --screen

View File

@ -19,7 +19,7 @@ services:
nofile: nofile:
soft: 1024 soft: 1024
hard: 524288 hard: 524288
{% if ENABLE_GPU %} {% if ENABLE_NVIDIA_GPU %}
deploy: deploy:
resources: resources:
reservations: reservations:
@ -27,7 +27,7 @@ services:
- driver: cdi - driver: cdi
device_ids: device_ids:
- nvidia.com/gpu=all - nvidia.com/gpu=all
{{% endif %} {% endif %}
networks: networks:
sdk: sdk: