K3s: Difference between revisions

imported>Atropos112
Added nvidia support
imported>Atropos112
m saw some typos after last edit, correcting (nvidia section only).
Line 115: Line 115:
</syntaxHighlight>
</syntaxHighlight>


Note, using docker here is a workaround, it will install nvidia-container-runtime and that will cause it to be accessible via "/run/current-system/sw/bin/nvidia-container-runtime", currently its not directly accessible in nixpkgs.
Note, using docker here is a workaround, it will install nvidia-container-runtime and that will cause it to be accessible via <code>/run/current-system/sw/bin/nvidia-container-runtime</code>, currently its not directly accessible in nixpkgs.


You now need to create a new file in  <code>/var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl</code> with the following
You now need to create a new file in  <code>/var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl</code> with the following
Line 153: Line 153:
     - name: NVIDIA_DRIVER_CAPABILITIES
     - name: NVIDIA_DRIVER_CAPABILITIES
       value: all
       value: all
to test its working exec onto a pod and run  <code>nvidia-smi </code>. For more configurability of nvidia related matters in k3s look in [https://docs.k3s.io/advanced#nvidia-container-runtime-support k3s-docs]
to test its working exec onto a pod and run  <code>nvidia-smi</code>. For more configurability of nvidia related matters in k3s look in [https://docs.k3s.io/advanced#nvidia-container-runtime-support k3s-docs]


== Troubleshooting ==
== Troubleshooting ==