Skip to content

GPU ressource is required when nvml plugin is activated #37

Open

Description

@ezychlagre

Describe the bug
In the last version of Helm chart (0.4.5), it is not possible to deploy alumet with the nvml plugin.
If you want to add the nvml plugin you have to modify daemonset for alumet client by requested gpu resources:

      'imagePullPolicy: IfNotPresent
       resources:
         {{- toYaml .Values.resources | nindent 12 }}
        limits:
          nvidia.com/gpu: 1
       volumeMounts:
         - name: sysfs
           mountPath: /sys'

But with this update, you request gpu resources on every nodes, to avoid deployement of alumet-client on nodes that do not have gpu resources, you can use tolerations. Nevertheless, you can not deployed alumet-client on all nodes of your k8s cluster if some nodes have gpu resources and other none.
How to solve this issue ? can we test the existing node resources at deployment step and activate/deactivate nvml plugin ? create 2 daemonset (one with gpu and one without) ?

The other problem is the name of library libnvidia-ml.so:
When GPU resources are requested in daemonset, the library libnvidia-ml.so is not present with this name in the pod. The libray name has a suffix with the nvidia driver version. For example on 2 different kubernetes I got the names:
libnvidia-ml.so.560.35.03
libnvidia-ml.so.570.148.08

It is possible in the daemonset to create a link or make a copy of this library:

 'containers:
     - name: alumet-relay-client
       image: {{ $global.image.registry }}/alumet-agent:{{ .Values.image.version | default (printf "%s-%.f_%s" .Chart.AppVersion .Values.image.revision .Values.image.osVersion) }}
      lifecycle:
        postStart:
          exec:
            # command: ["/usr/bin/find", "/", "-name", "libnvidia*.so*"]
            command: ["cp", "/usr/lib/x86_64-linux-gnu/libnvidia-ml.so.560.35.03", "/usr/lib/x86_64-linux-gnu/libnvidia-ml.so"]
       args: ["--config", "/etc/alumet/alumet-agent.toml"]'

Environment information
OS: kubernetes
Alumet version²: helm chart 0.4.5 but all older version are concerned
Enabled plugins: nvml

To Reproduce
Steps to reproduce the behavior:

  1. deploy alumet using the helm install comand with nvm plugin (--set alumet-relay-client.plugins.nvml.enable="true")
  2. alumet-client crash at startup

Expected behavior
no crash in alumet client.
The crash is due to the fact that the library libnvidia-ml.so is not present in the pod becaus no GPU resources was asked in the daemonset.

Logs / Output
Defaulted container "alumet-relay-client" out of: alumet-relay-client, wait-for-alumet-server (init)
[2026-02-25T15:22:35Z INFO alumet_agent] Starting Alumet agent 'alumet-agent' v0.9.3 (2026-02-11)
[2026-02-25T15:22:35Z INFO alumet::agent::builder] Initializing the plugins...
[2026-02-25T15:22:35Z INFO alumet::agent::builder] 4 plugins initialized.
[2026-02-25T15:22:35Z INFO alumet::agent::builder] Starting the plugins...
[2026-02-25T15:22:35Z INFO plugin_k8s] List of pods refreshed.
Error: startup failure

Caused by:
0: plugin failed to start: nvml v0.5.0
1: NVML initialization failed, please check your driver (do you have a dekstop/server NVidia GPU?)
2: a libloading error occurred: libnvidia-ml.so: cannot open shared object file: No such file or directory
3: libnvidia-ml.so: cannot open shared object file: No such file or directory

Activity

  1. TheElectronWill commented on Mar 5, 2026

    @TheElectronWill
    Member

    In my opinion, something is wrong with the setup if libnvidia-ml.so is not found. Usually, it's a symlink to the versioned .so (not a copy). But even without the symlink, I believe that it should work (lookup by name).

    Could you provide more information about your environment? In particular:

    • underlying OS on which K8S runs
    • content of the LD_LIBRARY_PATH environment variable
  2. ezychlagre commented on Mar 9, 2026

    @ezychlagre
    ContributorAuthor

    for information on the host (OS unbuntu 22.04.5) where k8s is installed the linux package installed for nvidia are:

    libnvidia-cfg1-560/unknown,now 560.35.03-0ubuntu1 amd64 [installed,automatic]
    libnvidia-common-560/unknown,now 560.35.03-0ubuntu1 all [installed,automatic]
    libnvidia-compute-560/unknown,now 560.35.03-0ubuntu1 amd64 [installed,automatic]
    libnvidia-container-tools/unknown,now 1.17.6-1 amd64 [installed,upgradable to: 1.18.1-1]
    libnvidia-container1/unknown,now 1.17.6-1 amd64 [installed,upgradable to: 1.18.1-1]
    libnvidia-decode-560/unknown,now 560.35.03-0ubuntu1 amd64 [installed,automatic]
    libnvidia-encode-560/unknown,now 560.35.03-0ubuntu1 amd64 [installed,automatic]
    libnvidia-extra-560/unknown,now 560.35.03-0ubuntu1 amd64 [installed,automatic]
    libnvidia-fbc1-560/unknown,now 560.35.03-0ubuntu1 amd64 [installed,automatic]
    libnvidia-gl-560/unknown,now 560.35.03-0ubuntu1 amd64 [installed,automatic]
    libnvidia-ml-dev/jammy,now 11.5.50~11.5.1-1ubuntu1 amd64 [installed,automatic]
    nvidia-compute-utils-560/unknown,now 560.35.03-0ubuntu1 amd64 [installed,automatic]
    nvidia-container-toolkit-base/unknown,now 1.17.6-1 amd64 [installed,upgradable to: 1.18.1-1]
    nvidia-container-toolkit/unknown,now 1.17.6-1 amd64 [installed,upgradable to: 1.18.1-1]
    nvidia-cuda-dev/jammy,now 11.5.1-1ubuntu1 amd64 [installed,automatic]
    nvidia-cuda-gdb/jammy,now 11.5.114~11.5.1-1ubuntu1 amd64 [installed,automatic]
    nvidia-cuda-toolkit-doc/jammy,now 11.5.1-1ubuntu1 all [installed,automatic]
    nvidia-cuda-toolkit/jammy,now 11.5.1-1ubuntu1 amd64 [installed]
    nvidia-dkms-560/unknown,now 560.35.03-0ubuntu1 amd64 [installed,automatic]
    nvidia-driver-560/unknown,now 560.35.03-0ubuntu1 amd64 [installed,automatic]
    nvidia-firmware-560-560.35.03/unknown,now 560.35.03-0ubuntu1 amd64 [installed,automatic]
    nvidia-fs-dkms/unknown,now 2.22.3-1 amd64 [installed,automatic]
    nvidia-fs/unknown,now 2.22.3-1 amd64 [installed,automatic]
    nvidia-gds-12-6/unknown,now 12.6.1-1 amd64 [installed,automatic]
    nvidia-gds/unknown,now 12.6.1-1 amd64 [installed]
    nvidia-kernel-common-560/unknown,now 560.35.03-0ubuntu1 amd64 [installed,automatic]
    nvidia-kernel-source-560/unknown,now 560.35.03-0ubuntu1 amd64 [installed,automatic]
    nvidia-opencl-dev/jammy,now 11.5.1-1ubuntu1 amd64 [installed,automatic]
    nvidia-prime/jammy,now 0.8.17.1 all [installed,automatic]
    nvidia-profiler/jammy,now 11.5.114~11.5.1-1ubuntu1 amd64 [installed,automatic]
    nvidia-settings/unknown,now 560.35.03-0ubuntu1 amd64 [installed,automatic]
    nvidia-utils-560/unknown,now 560.35.03-0ubuntu1 amd64 [installed,automatic]
    nvidia-visual-profiler/jammy,now 11.5.114~11.5.1-1ubuntu1 amd64 [installed,automatic]
    xserver-xorg-video-nvidia-560/unknown,now 560.35.03-0ubuntu1 amd64 [installed,automatic]
    

    Note that the variable LD_LIBRARY_PATH is not set.

  3. TheElectronWill commented on Apr 29, 2026

    @TheElectronWill
    Member

    Option 1

    Add a gpu limit (see limits/requests for gpu) so that the gpu-operator for k8s injects the library in the pod's container

    limits:
      nvidia.com/gpu: 1

    Problem: this allocates 1 gpu to the Alumet client, which we do not want.

    Option 2

    Mount the library in the container.
    Problem: the libc of the container is not necessarily ABI-compatible with the libc of the host, which will cause issues with the loading of the library

    Option 3 (preferred)

    Install nvml in the container, when we need to use it. Since it's only loaded on demand, it should even work without a gpu (just don't enable the plugin).
    Problem: increase the size of the container (but not that much IMO)

  4. titouanj commented on May 11, 2026

    @titouanj
    Contributor

    Only partially fixed in #47
    We need to consider option 3 or another one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions