Skip to content

Conversation

@elezar
Copy link
Member

@elezar elezar commented Oct 22, 2025

This change switches to the nvdevices and nvmodules packages
from nvidia-container-toolkit to create symlinks in /dev/char
instead of importing the cmd package.

This depends on #1372
See NVIDIA/mig-parted#262 for related work.

This change switches to the nvdevices and nvmodules packages
from nvidia-container-toolkit to create symlinks in /dev/char
instead of importing the cmd package.

Signed-off-by: Evan Lezar <[email protected]>
nvmodules.WithRoot(driverRootCtrPath),
)
if err := modules.LoadAll(); err != nil {
return fmt.Errorf("failed to load NVIDIA kernel modules: %v", err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return fmt.Errorf("failed to load NVIDIA kernel modules: %v", err)
return fmt.Errorf("failed to load NVIDIA kernel modules: %w", err)

err = creator.CreateLinks()
if err != nil {
if err := devices.CreateNVIDIAControlDevices(); err != nil {
return fmt.Errorf("failed to create device nodes for NVIDIA control devices: %v", err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return fmt.Errorf("failed to create device nodes for NVIDIA control devices: %v", err)
return fmt.Errorf("failed to create device nodes for NVIDIA control devices: %w", err)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants