microsoft/Windows-Containers

Support 3rd Party Vendor Specific Graphics APIs

Opened this issue · 9 comments

Currently GPU Acceleration within Windows Containers only allow for DirectX and frameworks built on top of it. Please allow for a way for us to leverage 3rd party Vendor specific frameworks (such as AMD AMF, ROCM, CUDA, and etc) to truly allow for GPU accelerated workloads.

Thanks for the request @sikhness. I want to understand a bit more the use case behind this request, what sort of apps / tools are you trying to use that requires 3rd party vendor frameworks?

Hi @fady-azmy-msft!
It would be useful for anything that requires video encoding/decoding capabilities such as a Media Server like Plex. Currently they can only use DirectX based encoding/decoding capabilities, but AMD, Intel and Nvidia offer AMF, QuickSync and NVENC respectively that many applications do use. In fact, not many applications use DirectX for this.

The same applies for AI based GPU workloads such as Ollama and AnythingLLM. None of these along with many others use DirectML (which is supported by Windows Containers), but they do use third party frameworks to use GPU acceleration such as AMD's ROCM and Nvidia's CUDA.

There's also some work done in the past by some people trying to get Unreal Engine Containers working on Windows with vendor specific graphics drivers, but it seems very convoluted and I was never able to get it working.

Creating a thread internally to discuss this feature request: 🔖 51837974

All of these APIs are supported, I think you can close this ticket.

Vendor specific frameworks (such as AMD AMF, ROCM, CUDA, and etc) to truly allow for GPU accelerated workloads.

Please visit "Enabling vendor-specific graphics APIs in Windows containers"

https://github.com/UnrealContainers/unrealcontainers.github.io/blob/23778bdd91c3c57a3a7258ca7e9201dd84d0510f/collections/_posts/2021-07-23-enabling-vendor-specific-graphics-apis-in-windows-containers.md

Good luck out there!

@doctorpangloss , it states in the article that you posted (which I also posted in my previous reply) that this is an unofficial way and isn't actually supported by Microsoft.
Furthermore, it is 3 years out of date, and I personally was not able to get it working (I did try and it was very involved).

I'm asking for an official method of having this working similar to how DirectX just works or at least officially documented on how to get it working if it involves any extra steps and such.

and I personally was not able to get it working (I did try and it was very involved).

what specifically are you trying to do? I run CUDA and AMF workloads using the exactly described steps in GPU enabled Windows containers all the time.

maybe start with FROM their-docker-image and docker run -it --device class/...theguid they talk about... and see for yourself, it will all work fine

Thanks for the info @doctorpangloss, do you happen to have a working Dockerfile or compose file for AMF that you've configured and are able to share?