This section describes a workflow that can be used to run the GPU Operator via VS Code debugger directly against a Kubernetes cluster of your choice.
- Cluster with GPUs
- Kubeconfig with cluster admin credentials placed in
${GIT_WORK_TREE}/hack/kubeconfig
- Copy
launch.json
andtasks.json
from${GIT_WORK_TREE}/hack/vscode/
into${GIT_WORK_TREE}/.vscode/
- If needed, adjust namespace in the
${GIT_WORK_TREE}/hack/prepare-env.sh
script (the default one isnvidia-gpu-operator
)
In order to run the operator locally against the remote cluster, use the "Run" or "Start Debugging" option in the VS Code.
Use breakpoints, watches and any other feature like you would debug any other Golang application.