0

Jetson Xavier NX

I want to run a GPU program in a k3s pod, but it shows the error

ImportError: libnppicc.so.10: cannot open shared object file: No such file or directory

it seems it cannot use GPU resource, because when I use docker run --runtime nvidia ... it works. How to set something like "--runtime nvidia" in the YAML for k3s deployment?

Edward Chang
  • 141
  • 1
  • 2
  • 11

1 Answers1

1

Follow this article: https://dev.to/mweibel/add-nvidia-gpu-support-to-k3s-with-containerd-4j17

--- Below does not work - the download link is broken ---

1. First configure the containerd to use the nvidia-container-runtime plugin

$ sudo wget https://k3d.io/usage/guides/cuda/config.toml.tmpl -O /var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl

2. Install NVIDIA device plugin for Kubernetes

$ cat <<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

Reference: https://itnext.io/enabling-nvidia-gpus-on-k3s-for-cuda-workloads-a11b96f967b0

Rakesh Gupta
  • 3,507
  • 3
  • 18
  • 24
  • I got the error when running ``` $ sudo wget https://k3d.io/usage/guides/cuda/config.toml.tmpl -O /var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl ``` ``` --2021-12-19 13:08:03-- https://k3d.io/usage/guides/cuda/config.toml.tmpl Resolving k3d.io (k3d.io)... 2606:4700:3031::6815:3dcc, 2606:4700:3036::ac43:d673, 104.21.61.204, ... Connecting to k3d.io (k3d.io)|2606:4700:3031::6815:3dcc|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2021-12-19 13:08:04 ERROR 404: Not Found. ``` – Edward Chang Dec 19 '21 at 05:18
  • Sorry, you are right, the link is broken. Try this article instead: https://dev.to/mweibel/add-nvidia-gpu-support-to-k3s-with-containerd-4j17 – Rakesh Gupta Dec 19 '21 at 05:28