Compare commits
2 Commits
a60a1784f7
...
5792496ab2
Author | SHA1 | Date |
---|---|---|
Alex Davies | 5792496ab2 | |
Alex Davies | f0fce2dc54 |
15
copier.yml
15
copier.yml
|
@ -24,7 +24,18 @@ LANGUAGES:
|
|||
|
||||
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: |
|
||||
ENABLE_NVIDIA_GPU
|
||||
Enabling nvidia gpus make deployment much more complicated.
|
||||
Ensure you have the nvidia container toolkit installed and
|
||||
working properly.
|
||||
|
||||
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
|
||||
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
|
||||
|
|
|
@ -14,7 +14,9 @@ WORKDIR /root/catkin_ws/src
|
|||
COPY ./ {{PACKAGE_NAME}}
|
||||
|
||||
RUN apt-get clean
|
||||
HEALTHCHECK {{HEALTHCHECK}}
|
||||
|
||||
#Don't forget to set a healthcheck for your container!
|
||||
{{HEALTHCHECK}}
|
||||
|
||||
# Command to run your application
|
||||
CMD {{RUN_COMMAND}} --wait --screen
|
||||
|
|
|
@ -19,6 +19,15 @@ services:
|
|||
nofile:
|
||||
soft: 1024
|
||||
hard: 524288
|
||||
{% if ENABLE_NVIDIA_GPU %}
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
devices:
|
||||
- driver: cdi
|
||||
device_ids:
|
||||
- nvidia.com/gpu=all
|
||||
{% endif %}
|
||||
|
||||
networks:
|
||||
sdk:
|
||||
|
|
Loading…
Reference in New Issue