Add nvidia containerd template for nenya.
This commit is contained in:
parent
fa48a70cfd
commit
dcb8b63e39
2 changed files with 47 additions and 0 deletions
|
@ -80,6 +80,7 @@
|
|||
|
||||
# TODO: Replace this with embedded spegel in the future
|
||||
- name: Copy custom containerd configuration
|
||||
when: inventory_hostname != 'nenya'
|
||||
notify: Restart Kubernetes
|
||||
ansible.builtin.copy:
|
||||
src: files/config.toml.tmpl
|
||||
|
@ -88,6 +89,17 @@
|
|||
group: root
|
||||
mode: "0644"
|
||||
|
||||
- name: Copy custom containerd configuration
|
||||
when: inventory_hostname == 'nenya'
|
||||
notify: Restart Kubernetes
|
||||
ansible.builtin.copy:
|
||||
src: files/config.nvidia.toml.tmpl
|
||||
dest: /var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl
|
||||
owner: root
|
||||
group: root
|
||||
mode: "0644"
|
||||
|
||||
|
||||
handlers:
|
||||
- name: Restart Kubernetes
|
||||
ansible.builtin.systemd:
|
||||
|
|
35
ansible/main/playbooks/files/config.nvidia.toml.tmpl
Normal file
35
ansible/main/playbooks/files/config.nvidia.toml.tmpl
Normal file
|
@ -0,0 +1,35 @@
|
|||
version = 2
|
||||
|
||||
[plugins."io.containerd.internal.v1.opt"]
|
||||
path = "/var/lib/rancher/k3s/agent/containerd"
|
||||
|
||||
[plugins."io.containerd.grpc.v1.cri"]
|
||||
stream_server_address = "127.0.0.1"
|
||||
stream_server_port = "10010"
|
||||
enable_selinux = false
|
||||
enable_unprivileged_ports = true
|
||||
enable_unprivileged_icmp = true
|
||||
sandbox_image = "registry.k8s.io/pause:3.9"
|
||||
|
||||
[plugins."io.containerd.grpc.v1.cri".containerd]
|
||||
snapshotter = "overlayfs"
|
||||
disable_snapshot_annotations = true
|
||||
|
||||
|
||||
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes]
|
||||
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.nvidia]
|
||||
privileged_without_host_devices = false
|
||||
runtime_engine = ""
|
||||
runtime_root = ""
|
||||
runtime_type = "io.containerd.runc.v2"
|
||||
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.nvidia.options]
|
||||
BinaryName = "/usr/bin/nvidia-container-runtime"
|
||||
|
||||
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
|
||||
runtime_type = "io.containerd.runc.v2"
|
||||
|
||||
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
|
||||
SystemdCgroup = true
|
||||
|
||||
[plugins."io.containerd.grpc.v1.cri".registry]
|
||||
config_path = "/var/lib/rancher/k3s/agent/etc/containerd/certs.d"
|
Loading…
Reference in a new issue