Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binaries located at /opt/bin #683

Open
denisstrizhkin opened this issue Sep 7, 2024 · 1 comment
Open

Binaries located at /opt/bin #683

denisstrizhkin opened this issue Sep 7, 2024 · 1 comment
Assignees

Comments

@denisstrizhkin
Copy link

denisstrizhkin commented Sep 7, 2024

On Gentoo Linux Nvidia binaries are located at /opt/bin.

Output of nvidia-ctk cdi generate --output=/etc/cdi/nvidia.yaml:

INFO[0005] Selecting /opt/bin/nvidia-smi as /opt/bin/nvidia-smi
INFO[0005] Selecting /opt/bin/nvidia-debugdump as /opt/bin/nvidia-debugdump
INFO[0005] Selecting /opt/bin/nvidia-cuda-mps-control as /opt/bin/nvidia-cuda-mps-control
INFO[0005] Selecting /opt/bin/nvidia-cuda-mps-server as /opt/bin/nvidia-cuda-mps-server

Then inside the container one would need to run nvidia-smi as /opt/bin/nvidia-smi unless PATH is updated accordingly. Maybe all the binaries should go into /usr/bin explicitly? I think that would make sense.

@elezar
Copy link
Member

elezar commented Sep 18, 2024

@denisstrizhkin yes. At present we generally use the same path in the container as on the host, but this can be restrictive.

As a workaround, you could try and apply a CDI transform to the generated CDI spec. Something like:

nvidia-ctk cdi transform root --from /opt/bin --to /usr/bin --relative-to container --input=/etc/cdi/nvidia.yaml

You could also use:

nvidia-ctk cdi generate | nvidia-ctk cdi transform root --from /opt/bin --to /usr/bin --relative-to container --output=/etc/cdi/nvidia.yaml

since the transform command accepts input from stdin by default.

@elezar elezar self-assigned this Sep 18, 2024
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

No branches or pull requests

2 participants