-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
79 lines (75 loc) · 2.18 KB
/
Taskfile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---
version: "3"
vars:
PROJECT_DIR:
sh: "git rev-parse --show-toplevel"
includes:
talos:
taskfile: .taskfiles/talos/Taskfile.yaml
vars:
dopplerProject: jtcressy-home-infra
dopplerConfig: cluster
eso:
taskfile: .taskfiles/eso/Taskfile.yaml
vars:
dopplerProject: jtcressy-home-infra
dopplerConfig: eso
restic:
taskfile: .taskfiles/restic/Taskfile.yaml
vars:
dopplerProject: restic-backups
dopplerConfig: cloudflare-r2
volsync:
taskfile: .taskfiles/volsync/Taskfile.yaml
apps:
taskfile: .taskfiles/apps/Taskfile.yaml
tasks:
default:
silent: true
cmds:
- task -l
cuda:
summary: runs a kubernetes pod with nvidia-smi
vars:
podOverrides: | # pod override to include nvidia.com/gpu: 1 resources and nvidia runtime class
{
"spec": {
"containers": [
{
"name": "nvidia-smi",
"image": "nvcr.io/nvidia/cuda:12.1.0-base-ubuntu22.04",
"stdin": true,
"stdinOnce": true,
"tty": true,
"securityContext": {
"allowPrivilegeEscalation": false,
"capabilities": {
"drop": ["ALL"]
},
"seccompProfile": {
"type": "RuntimeDefault"
}
}
}
],
"affinity": {
"nodeAffinity": {
"requiredDuringSchedulingIgnoredDuringExecution": {
"nodeSelectorTerms": [
{
"matchExpressions": [
{
"key": "nvidia.com/gpu.count",
"operator": "Exists"
}
]
}
]
}
}
},
"runtimeClassName": "nvidia"
}
}
cmds:
- kubectl run --rm -it --restart=Never nvidia-smi-{{ now | unixEpoch | sha256sum | trunc 10 }} --image=nvcr.io/nvidia/cuda:12.1.0-base-ubuntu22.04 --overrides '{{.podOverrides}}' -- bash -c '{{.CLI_ARGS}}'