stl88083365 / unraid-nvidia-vgpu-driver

121 stars 22 forks source link

Install nvidia driver #17

Open mikeyo opened 9 months ago

mikeyo commented 9 months ago

I assume the plugin no longer works so how do you install the latest driver in UNRAID. I am running 6.12.6. I tried but nvidia-smi not working??

root@MOMEDIA:/mnt/disk1/isos# installpkg nvidia-535.129.03-6.1.63-Unraid-1.txz Verifying package nvidia-535.129.03-6.1.63-Unraid-1.txz. Installing package nvidia-535.129.03-6.1.63-Unraid-1.txz: PACKAGE DESCRIPTION: Package nvidia-535.129.03-6.1.63-Unraid-1.txz installed. root@MOMEDIA:/mnt/disk1/isos# depmod -a root@MOMEDIA:/mnt/disk1/isos# nvidia-modprobe

root@MOMEDIA:/mnt/disk1/isos# nvidia-smi NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.

rootd00d commented 9 months ago

Unraid 6.12.6 uses Linux Kernel 6.1.64.

The plugin downloads the driver made available as a "Release" in the GitHub repository. If you go to the current releases, you'll see there's no driver package for your kernel yet (6.1.64), but there are for older kernels/versions of Unraid. Looks like there's some activity on this recently ("under test..."), so I think we just sit tight for now.

Since the driver that gets downloaded has to exactly match, and be compiled only for your exact version of Unraid, you'll have to wait until said driver gets uploaded as part of the 6.1.64 release -- that's the version of the kernel, not Unraid.

stl88083365 commented 9 months ago

It's already working, if it doesn't work, please delete the plugin again and install it again.

rootd00d commented 9 months ago

@mikeyo If you go to the "Releases" section now, you'll see that @stl88083365 has uploaded 2 new files within the 6.1.64 release that the plugin was trying to install.

This is the line of code in the plugin that tries to locate the tarball to use --

LAT_PACKAGE="$(wget -qO- https://api.github.com/repos/stl88083365/unraid-nvidia-vgpu-driver/releases/tags/${KERNEL_V} | jq -r '.assets[].name' | grep "${PACKAGE}" | grep -E -v '\.md5$' | sort -V | tail -1)"

It accesses the GitHub API and looks for the md5 to grab the driver version that's applicable for your actual kernel version. Pretty neat, really!

mikeyo commented 9 months ago

@mikeyo If you go to the "Releases" section now, you'll see that @stl88083365 has uploaded 2 new files within the 6.1.64 release that the plugin was trying to install.

This is the line of code in the plugin that tries to locate the tarball to use --

LAT_PACKAGE="$(wget -qO- https://api.github.com/repos/stl88083365/unraid-nvidia-vgpu-driver/releases/tags/${KERNEL_V} | jq -r '.assets[].name' | grep "${PACKAGE}" | grep -E -v '\.md5$' | sort -V | tail -1)"

It accesses the GitHub API and looks for the md5 to grab the driver version that's applicable for your actual kernel version. Pretty neat, really!

I will test this, thank you.

mikeyo commented 9 months ago

Unraid 6.12.6 uses Linux Kernel 6.1.64.

The plugin downloads the driver made available as a "Release" in the GitHub repository. If you go to the current releases, you'll see there's no driver package for your kernel yet (6.1.64), but there are for older kernels/versions of Unraid. Looks like there's some activity on this recently ("under test..."), so I think we just sit tight for now.

Since the driver that gets downloaded has to exactly match, and be compiled only for your exact version of Unraid, you'll have to wait until said driver gets uploaded as part of the 6.1.64 release -- that's the version of the kernel, not Unraid.

Is the script required for each VM you want to divide the vgpu for? I have 4 VMs and want to split my Tesla P4 x 4. So I need to run 4 copies of the script and change the VM UID in each one?

stl88083365 commented 9 months ago

Only one copy of the script needs to be run. To modify it slightly

mikeyo commented 9 months ago

Only one copy of the script needs to be run. To modify it slightly

Please explain. I want to split my P4 8GB in to 2x4 vGPUs and add these to 2x Windows 11 VMs. What would the script config look like please?

stl88083365 commented 9 months ago

The scripts remain largely unchanged. Simply add the WIN="2b6976dd-8620-49de-8d8d-ae9ba47a50db" UBU="5fd6286d-06ac-4406-8b06-f26511c260d3" Two variables are being added below. Example: WIN2 WIN3 arr=( "${WIN}" "${UBU}" ) Modify to arr=( "${WIN}" "${UBU}" "${WIN2}" "${WIN3}" )

stl88083365 commented 9 months ago

MDEVLIST="nvidia-65" followed by nvidia-65 Use the mdevctl types command to get it.

stl88083365 commented 9 months ago

https://gitlab.com/polloloco/vgpu-proxmox There are partial configuration instructions. A reference can be made

stl88083365 commented 5 months ago

pci设备是只有一个啊。


@.***

 

------------------ 原始邮件 ------------------ 发件人: "stl88083365/unraid-nvidia-vgpu-driver" @.>; 发送时间: 2024年4月26日(星期五) 晚上11:12 @.>; @.**@.>; 主题: Re: [stl88083365/unraid-nvidia-vgpu-driver] Install nvidia driver (Issue #17)

可以帮忙贴一个配置多个虚拟显卡的例子吗?我添加了WIN2,WIN3 等,但还是只有一个PCIE设备,无法在两个虚拟机里同时添加虚拟显卡。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>