mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat: Add server-level GPU support for Docker Swarm deployments and API endpoint for setup
This commit is contained in:
9
packages/server/src/utils/gpu-setup.ts
Normal file
9
packages/server/src/utils/gpu-setup.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { docker } from '../constants';
|
||||
|
||||
export async function setupGPUSupport() {
|
||||
await docker.swarmUpdate({
|
||||
TaskDefaults: {
|
||||
GenericResources: [{ DiscreteResourceSpec: { Kind: 'gpu', Value: 1 } }]
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user