Is it possible to run a complete linux desktop with GPU passthrough in a docker container instead of a VM ?


anonlio

Recommended Posts

Hi here :)
So I guess the title says it pretty much, but to add a bit more detail about the question: I have been successfully using a linux VM with GPU passthrough on Unraid as my main computer for the past few years. I must say it is a blast to use and removed a good bit of data loss stress in my life after over 20 years of manually managing backups.

I am now getting attracted by the idea of running my setup in a Docker container, mostly out of curiosity but I am also not sure if it really make sens. I don't really comprehend how memory would be shared in that setup. I have 32 GB of ram on my server and usually use 16GB for my desktop VM. I also run ~10 other containers for miscellaneous services.

I found  this question online (not Unraid related) that have some research tracks but I'm wondering if maybe there is an obvious Unraid way of achieving that objective.

If this idea does not make any sens xD please feel free to let me know and also why.

Thanks to everyone that might give some input on that topic.

Edited by anonlio
  • Like 1
Link to comment
  • anonlio changed the title to Is it possible to run a complete linux desktop with GPU passthrough in a docker container instead of a VM ?

It may be possible but its not really what docker was designed for. For os containers i think LXC is a more likely path, though I dont know if/how GPU's integrate with it. LXC is not a built in option for unraid but there was a plugin recently released to add it. It may be worth looking in to.

 

Link to comment
  • 1 month later...

In answer to your question - Docker, not really the correct way to go with this.

 

LXC - using LXD VM's - yes, it is possible and it works.

 

I have an Ubuntu host, lxd installed, created a Win10 VM and was able to pass through my Physical AMD RX 6600. This is my first stage of testing - next will be to attempt to chop up the 6600 and hopefully have 2 LXD VM's with a 4GiB GPu Profile attached -

 

For the moment, the entire Physical GPU to the lxd VM, yes without question.

Link to comment
  • 1 year later...
On 7/8/2022 at 12:47 AM, deaners said:

In answer to your question - Docker, not really the correct way to go with this.

 

LXC - using LXD VM's - yes, it is possible and it works.

 

I have an Ubuntu host, lxd installed, created a Win10 VM and was able to pass through my Physical AMD RX 6600. This is my first stage of testing - next will be to attempt to chop up the 6600 and hopefully have 2 LXD VM's with a 4GiB GPu Profile attached -

 

For the moment, the entire Physical GPU to the lxd VM, yes without question.

How did you get on with this, all working?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.