From 187bbd262fdafd33cf81c6bff7fbba1fab68de86 Mon Sep 17 00:00:00 2001 From: IronicBadger Date: Sun, 17 Mar 2024 18:45:25 -0700 Subject: [PATCH] added gpu stuff --- templates/docker-compose.yml.j2 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/templates/docker-compose.yml.j2 b/templates/docker-compose.yml.j2 index dd816af..31a06c5 100644 --- a/templates/docker-compose.yml.j2 +++ b/templates/docker-compose.yml.j2 @@ -179,6 +179,15 @@ services: {% endif %} start_period: {{ container.healthcheck.start_period }} {% endif %} +{% if container.deploy.resources.reservations.devices is defined %} + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: {{ container.deploy.resources.reservations.devices.driver.count | default("1") }} + capabilities: [gpu] +{% endif %} {% if container.restart is defined %} restart: {{ container.restart }} {% endif %}