FWIW I did this with jellyfin and ended up just using a vm instead of lxc. This way I could just pass the entire device through, not have to mess with drivers in my proxmox host, and not have to reboot all my vms/lxc just to apply updates.
I can do that no issue, simply thought it could be a good learning experience to use LXCs as I have never used them before.
A wprthy cause, but there's no end of other things to host in LXC. It's possible, but unpleasant and can be brittle for updates.
It should be the same process as for Jellyfin, aside from the steps to install or change settings in Jellyfin itself.
https://www.reddit.com/r/Proxmox/comments/1c9ilp7/proxmox_gpu_passthrough_for_jellyfin_lxc_with/
Will give this a look. Thank you.
Good luck! I struggled immensely with getting it to work in an unprivileged container, especially the bind mounts and their permissions for my media file shares. I ended up giving up and running Jellyfin in a privileged container after a few days of fighting with it.
You could read the script and see what it does.
First thing I tried doing, it has the relevant parts for setting up the GPU in case the LXC was privileged, but nowhere do I see how it sets it up in case the LXC was unprivileged.
-
Nesting=1. This isn't about virtualizing inside the container, it allows internal resources to access parent resources.
-
You should only need the cgroup2 entries, but they should be pointing to the correct devices:
- cgroup2 entries to allow rwm access to the correct device
- /dev/dri dir and file entries that specify bind,optional,create
Nvidia example, but quicksync is similar:
lxc.cgroup2.devices.allow: c 226:0 rwm
lxc.cgroup2.devices.allow: c 226:128 rwm
lxc.mount.entry: /dev/dri dev/dri none bind,optional,create=dir
lxc.mount.entry: /dev/dri/renderD128 dev/renderD128 none bind,optional,create=file
I have an N150 proxmox setup as well. I had to enable iommu in the kernel to get pci-e pass through working (intel_iommu=on).
Selfhosted
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!