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

feat(GPUManager): check nvidia container toolkit capabilities #1825

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

axel7083
Copy link
Contributor

@axel7083 axel7083 commented Oct 1, 2024

What does this PR do?

Add some utility function to the GPUManager to check if nvidia-ctk is installed on the machine or native host (linux) for nvidia cards.

ℹ️ Nothing is exposed to the user currently.

Screenshot / video of UI

N/A

What issues does this PR fix or reference?

Fixes #1824
Requied for #1591
Part of #1708

How to test this PR?

  • unit tests has been provided

Manually

You can check manually by adding the following code to the studio.ts

    setTimeout(() => {
      this.#gpuManager?.collectGPUs().then((gpus) => {
        console.log('collectGPUs', gpus);

        const connections = this.#podmanConnection?.getContainerProviderConnections() ?? [];
        Promise.all(
          connections.filter(connection => connection.status() === 'started').map((connection) => (this.#gpuManager?.getGPUContainerDeviceInterface(connection)))
        ).then((result) => {
          console.log('promise all get GPU CDI', result);
        })
          .catch((err: unknown) => {
          console.error('promise all get GPU CDI', err);
        });
      }).catch((err: unknown) => {
        console.error('collectGPUs', err);
      });
    }, 10000);

@axel7083 axel7083 requested review from benoitf, jeffmaury and a team as code owners October 1, 2024 10:35
@gastoner
Copy link

gastoner commented Oct 1, 2024

I dont have a NVIDIA GPU 😢 to test this

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.

GPU Manager should detect the nvidia-ctk
2 participants