-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat: Implement Remote server and Dokploy Server - GPU Support for Docker Swarm #590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Implement Remote server and Dokploy Server - GPU Support for Docker Swarm #590
Conversation
…PI endpoint for setup
Siumauricio
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The implementation looks good, I haven tested yet, we have two way of deploying applications:
- Dopkloy Server(Done)
- Remote servers(Missing)
Can you add support for remote servers?
|
The current Remote Server GPU Support: The user needs to ensure that the necessary GPU hardware and drivers are installed and configured on the remote server. Once this is done, the user can simply add the GPU configuration to their deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities:
- gpuAdditional Implementation: if required we can add an option under new server Deployment For Reference: You can review the recording here |
… GPU constants from index.ts
Siumauricio
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know where to activate it because I don't see any way to trigger the setupGPU method other than through the API, you need to expose some way to do it trought the UI
…us checks, including API endpoints and utility functions
…ate environment variables
vishalkadam47
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed the changes as suggested
Siumauricio
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested and works great and the UI Looks awesome
I rent a GPU Droplet in digitalocean and I tried to see the GPU Setup and I get this:
Then I tried to setup the GPU and I got this error
"NVIDIA drivers or runtime not installed. Please install them first.",
Then I look in to the code and commented this code, I think here we need to do something because here are validating if we already have enabled the docker gpu runtime in docker swarm, but that is wrong because we are not setup yet, so first we need to setup and then we can check that validation
GPU Status Check Result: {
driverInstalled: true,
driverVersion: '535.183.06',
runtimeInstalled: false,
runtimeConfigured: false,
availableGPUs: 1,
swarmEnabled: false,
gpuResources: 0,
gpuModel: 'NVIDIA H100 80GB HBM3',
memoryInfo: '81559 MiB',
cudaSupport: true,
cudaVersion: '12.2'
}
Then it works
Also before i setup the GPU Setup I tried to deploy the blender template and I have this error

But when I activate the gpu it works now

I think it works very good, just need a few validations as I mentioned above
apps/dokploy/components/dashboard/settings/servers/gpu-support.tsx
Outdated
Show resolved
Hide resolved
apps/dokploy/components/dashboard/settings/servers/gpu-support.tsx
Outdated
Show resolved
Hide resolved
NVIDIA Container Runtime is not installed. Please follow these steps:
Note: for some
|
I don't think that's the solution, because I didn't have to install anything in that gpu droplet, there is only one validation that you don't have to do when you want to do the gpu configuration, and that was the portion of the code that I commented |
I understand your point. Some GPU VM instance comes with everything pre-installed, so there's no additional setup needed. However, for daemon.json configuration, it's necessary to have the NVIDIA Container Runtime installed. This is why we need a check to notify users to install it if it’s missing. To improve this process, I’ve separated out the check, which should make it more effective. I’ll push an update shortly, and would appreciate your feedback. This check is also valuable for local GPU setups, as we’re using the same components across both Dokploy Server and Remote Server. |
- Add gpu status refresh with useEffect - Update docker-compose.yml configuration - Modify gpu setup scripts - Improve gpu support checks
vishalkadam47
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed console logs and error handling
vishalkadam47
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed sleep function and updated import
Siumauricio
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this huge PR ❤️








This PR introduces GPU support in Dokploy by leveraging Docker Swarm's native GPU resource management capabilities. The implementation follows the Docker Swarm GPU configuration guidelines, enabling seamless integration of GPU resources across the infrastructure.
Key aspects of the implementation:
The GPU support work seamlessly at the server level, allowing applications to utilize GPU resources when available.
This feature significantly expands Dokploy's capabilities, enabling efficient deployment and management of GPU-dependent applications through Docker Swarm's native resource management system.