# Docker Swarm GPU Support

**URL:** <https://forums.docker.com/t/docker-swarm-gpu-support/148295>\
**Category:** General\
**Tags:** swarm, docker-compose\
**Created:** [May 24, 2025, 7:53pm UTC](https://forums.docker.com/t/docker-swarm-gpu-support/148295 "2025-05-24T19:53:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dockeriddonuts](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/dockeriddonuts/32/54538_2.png) [@dockeriddonuts](https://forums.docker.com/u/dockeriddonuts)\
**Post date:** [May 24, 2025, 7:53pm UTC](https://forums.docker.com/t/docker-swarm-gpu-support/148295/1 "2025-05-24T19:53:47Z")

</div>

Hi everyone.

This forum is the last hope for me to guide me about the docker swarm ability to use the GPU.

I’m trying to provide my stack.yml file a runtime property or any other property from where I can tell it which runtime to use. But, it does not let me deploy that.

Additionally, upon making the default container runtime “Nvidia”. I got success. But, that’s really not a solution, as all the containers will inherit from that runtime.

I need a way to explicitly mention the docker swarm services the runtime it needs to use and I want to keep the default runtime as runc.

Is there any way or anything people can help us? Awaiting for your response. Anybody! Thanks!

Regards,  
Ahson Shaikh

---

<div class="post-metadata">

**Author:** ![meyay](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/meyay/32/34000_2.png) [@meyay](https://forums.docker.com/u/meyay)\
**Post date:** [May 25, 2025, 10:56am UTC](https://forums.docker.com/t/docker-swarm-gpu-support/148295/2 "2025-05-25T10:56:14Z")

</div>

I just used the forum search and found this topic:

> [@Manage GPUs in a docker swarm](https://forums.docker.com/t/manage-gpus-in-a-docker-swarm/107277):
>
> Hi everyone, I am new to docker and I am curious about how to mange GPUs in a docker swarm. I have multiple Linux servers and each machine is equipped with multiple NVIDIA GPUs (three servers and each has two GPUs: GPU 0 and GPU 1). What I have done so far: 1. I create a swarm consisting of one manager and two workers; 2. I follow the instructions in this post [Instructions for Docker swarm with GPUs · GitHub](https://gist.github.com/tomlankhorst/33da3c4b9edbde5c83fc1244f010815c) and expose the GPU resources on the worker nodes; 3. Now I can create docker servic…

Note: I don’t use Swarm with GPU support, so I won’t be able to answer any follow-up questions.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/docker/original/3X/6/9/69c4b276d1979e4e35a2f0338bac246a4de21daf.png) [@system](https://forums.docker.com/u/system)\
**Post date:** [June 24, 2025, 10:56am UTC](https://forums.docker.com/t/docker-swarm-gpu-support/148295/3 "2025-06-24T10:56:31Z")

</div>

Closed on June 24, 2025, 10:56am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
