LXC vs Docker or VM vs GPU

lemel

New Member
May 14, 2023
13
0
1
I'm in a bit of a bind here and unsure on what options I have, if any.

I'm trying to install Nextcloud's AIO via Docker, with GPU passthrough for video transcoding. The GPU will be shared as I already have a Jellyfin CT already set-up with the GPU.

If I set-up a VM, which Docker prefers, then I lose my Jellyfin GPU. From what I understand if you pass a GPU to a VM, then it can't be shared.
If I set-up a CT, which allows for GPU sharing, then I lose Docker which doesn't have good LXC support.
On top of all this, if I use a CT, then it has to be privileged since you can't pass a GPU to unprivileged, and this opens up a bunch of security questions.

In short, has anyone set-up an environment with Docker, where you are able to share a GPU? I'd love some use case examples.
 
You could use vGPU to share some GPUs with multiple VMs. But it is questionable if that is still legal without paying nvidia license costs and it is very hacky and easy to screw up when keeping PVE updated.

Most secure, legal and stable option would be to buy multiple GPUs and workstation/server mainboards that can handle multiple GPUs without running out of PCIe lanes or isolated IOMMU groups.

Why does your Nextcloud need a GPU?

What about a single docker VM where you run your jellyfin + nextcloud as docker containers? Then both could use the same GPU.
 
Last edited:
Thanks, I'm running Nextcloud to manage photos/videos and transcoding would help a lot with video playback.

Ideally I'd like to keep Nextcloud/Jellyfin separate, so I would rather not combine them in 1 VM.

I think my best bet here is to do a manual install of NC on a privileged CT, with shared GPU and no docker.
 
On top of all this, if I use a CT, then it has to be privileged since you can't pass a GPU to unprivileged, and this opens up a bunch of security questions.
You can pass a GPU to an unprivileged CT. I see those Jellyfin docs say you must use privileged, but it doesn't state why. Is there a reason? My guess is they didn't want to do the user/group mapping.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!