This repository has been archived by the owner on Nov 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add K8s deployment for getting started with gpu
- Loading branch information
1 parent
91b7c45
commit 28d4bee
Showing
1 changed file
with
103 additions
and
0 deletions.
There are no files selected for viewing
103 changes: 103 additions & 0 deletions
103
GpuReferenceModules/SampleSolution/deployment.k8s.template.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
{ | ||
"$schema-template": "2.0.0", | ||
"modulesContent": { | ||
"$edgeAgent": { | ||
"properties.desired": { | ||
"schemaVersion": "1.0", | ||
"runtime": { | ||
"type": "docker", | ||
"settings": { | ||
"minDockerVersion": "v1.25", | ||
"loggingOptions": "", | ||
"registryCredentials": { | ||
"${CONTAINER_REGISTRY_NAME}":{ | ||
"username": "$CONTAINER_REGISTRY_USERNAME", | ||
"password": "$CONTAINER_REGISTRY_PASSWORD", | ||
"address": "${CONTAINER_REGISTRY_NAME}.azurecr.io" | ||
} | ||
} | ||
} | ||
}, | ||
"systemModules": { | ||
"edgeAgent": { | ||
"type": "docker", | ||
"settings": { | ||
"image": "mcr.microsoft.com/azureiotedge-agent:1.0", | ||
"createOptions": {} | ||
} | ||
}, | ||
"edgeHub": { | ||
"type": "docker", | ||
"status": "running", | ||
"restartPolicy": "always", | ||
"settings": { | ||
"image": "mcr.microsoft.com/azureiotedge-hub:1.0", | ||
"createOptions": { | ||
"HostConfig": { | ||
"PortBindings": { | ||
"5671/tcp": [ | ||
{ | ||
"HostPort": "5671" | ||
} | ||
], | ||
"8883/tcp": [ | ||
{ | ||
"HostPort": "8883" | ||
} | ||
], | ||
"443/tcp": [ | ||
{ | ||
"HostPort": "443" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"modules": { | ||
"GPUModule": { | ||
"version": "1.0", | ||
"type": "docker", | ||
"status": "running", | ||
"restartPolicy": "always", | ||
"settings": { | ||
"image": "${MODULES.GPUModule}", | ||
"createOptions": { | ||
"k8s-experimental": { | ||
"resources": { | ||
"limits": { | ||
"nvidia.com/gpu": 1 | ||
} | ||
}, | ||
"strategy": { | ||
"type": "Recreate" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"$edgeHub": { | ||
"properties.desired": { | ||
"schemaVersion": "1.0", | ||
"routes": { | ||
"GPUModuleToIoTHub": "FROM /messages/modules/GPUModule/outputs/* INTO $upstream" | ||
}, | ||
"storeAndForwardConfiguration": { | ||
"timeToLiveSecs": 7200 | ||
} | ||
} | ||
}, | ||
"GPUModule": { | ||
"properties.desired": { | ||
"RunExecutionCount": 3, | ||
"WarmUpCount": 3, | ||
"Shape": 5000 | ||
} | ||
} | ||
} | ||
} |