nvidia-cdi-hook

command
v1.20.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

README

NVIDIA CDI Hook

The CLI nvidia-cdi-hook provides container device runtime hook capabilities when called by a container runtime, as specific in a Container Device Interface file.

Generating a CDI

The CDI itself is created for an NVIDIA-capable device using the nvidia-ctk cdi generate command.

When nvidia-ctk cdi generate is run, the CDI specification is generated as a yaml file. The CDI specification provides instructions for a container runtime to set up devices, files and other resources for the container prior to starting it. Those instructions may include executing command-line tools to prepare the filesystem. The execution of such command-line tools is called a hook.

nvidia-cdi-hook is the CLI tool that is expected to be called by the container runtime, when specified by the CDI file.

See the nvidia-ctk documentation for more information on generating a CDI file.

Functionality

The nvidia-cdi-hook CLI provides the following functionality:

  • chmod - Change the permissions of a file or directory inside the directory path to be mounted into a container.
  • create-symlinks - Create symlinks inside the directory path to be mounted into a container.
  • update-ldcache - Update the dynamic linker cache inside the directory path to be mounted into a container.
  • enable-cuda-compat - Ensure that the directory containing the CUDA compat libraries is added to the ldconfig search path if required.
  • disable-device-node-modification - Ensure that the /proc/driver/nvidia/params file present in the container does not allow device node modifications.
  • update-application-profile - Update driver settings through "application profiles". Currently, this hook sets EGLVisibleDGPUDevices to restrict EGL/Vulkan GPU visibility inside the container.
  • apply-cuda-memory-limits - Set the soft and hard limits of CUDA memory usage on GPU device(s) in the container.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL