<p>Jetson Xavier NX</p>
<p>I want to run a GPU program in a k3s pod, but it shows the error</p>
<pre><code>ImportError: libnppicc.so.10: cannot open shared object file: No such file or directory
</code></pre>
<p>it seems it cannot use GPU resource, because when I use docker run --runtime nvidia ... it works. How to set something like &quot;--runtime nvidia&quot; in the YAML for k3s deployment?</p>

Edward Chang
<p>Follow this article: <a href="https://dev.to/mweibel/add-nvidia-gpu-support-to-k3s-with-containerd-4j17" rel="nofollow noreferrer">https://dev.to/mweibel/add-nvidia-gpu-support-to-k3s-with-containerd-4j17</a></p>
<p>--- Below does not work - the download link is broken ---</p>
<p><strong>1. First configure the containerd to use the nvidia-container-runtime plugin</strong></p>
<pre><code>$ sudo wget https://k3d.io/usage/guides/cuda/config.toml.tmpl -O /var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl
</code></pre>
<p><strong>2. Install NVIDIA device plugin for Kubernetes</strong></p>
<pre><code>$ cat &lt;&lt;EOF | kubectl apply -f -
apiVersion: helm.cattle.io/v1
kind: HelmChart
metadata:
  name: nvidia-device-plugin
  namespace: kube-system
spec:
  chart: nvidia-device-plugin
  repo: https://nvidia.github.io/k8s-device-plugin
EOF
</code></pre>
<p>Reference: <a href="https://itnext.io/enabling-nvidia-gpus-on-k3s-for-cuda-workloads-a11b96f967b0" rel="nofollow noreferrer">https://itnext.io/enabling-nvidia-gpus-on-k3s-for-cuda-workloads-a11b96f967b0</a></p>
