There is a lot to unveil. This is what I have:
Hardware Config:
Processor: AMD Ryzen 5 2600X Six-Core Processor (12 CPUs), ~3.6GHz
Memory: 16384MB RAM
Card name: NVIDIA GeForce RTX 2070 SUPER
Proposed Software Config:
Windows 11 ✅ → Hyper-v ✅-> Windows 11 guest + Gpu Partitioning + Nested Virtualization ✅-> Docker Desktop + WSL ✅ → GPU acceleration (nvidia-smi) ❌
or
Windows 11 ✅ → Hyper-v ✅-> Windows 11 guest + Gpu Partitioning + Nested Virtualization ✅-> WSL Ubuntu ✅-> GPU acceleration (nvidia-smi) ❌
or
Windows 11 ✅ → Hyper-v ✅-> Windows 11 guest + Gpu Partitioning + Nested Virtualization ✅-> Docker Desktop Hyper-v ✅ → GPU acceleration (nvidia-smi) ❌
Software:
Windows 11 Pro 64-bit (10.0, Build 22631) (guest and host)
Linux version 5.15.153.1-microsoft-standard-WSL2
NVIDIA Graphics driver 561.09
Official Documentation:
GPU Partitioning Tutorial, Nested Virtualization
Cuda on WSL, Windows GPU acceleration for ML in WSL, Docker with Nvidia container toolkit
(can’t put links but they have this title)
Expected behavior on vm:
What doesn’t work as the guides suggests:
Nvidia driver for the gpu should be installed from the website not by copying the files from host like in GPU Partitioning Tutorial.
Nvidia driver installation inside WSL Ubuntu doesn’t also (this is against guide but just tried)
What works:
nvidia-smi in Windows guest
I’ve copied files from “C:\Windows\System32\lxss” to Windows guest and it recognises nvidia-smi in wsl
Actual behavior:
Ubuntu:$ nvidia-smi
Failed to initialize NVML: GPU access blocked by the operating system
Failed to properly shut down NVML: GPU access blocked by the operating system
Is there a way to fix this? (Maybe not an official one)
TLDR: I’m trying to use WSL\Docker inside the Windows guest to run a ML project like.