I don't use containers myself, but I bet the hardware acceleration section of the Jellyfin container install doc would be helpful.
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!
thanks! i took a look and sadly i've already covered those parts. :/
I use podman too and I set up hardware acceleration for Jellyfin. I'll update this with how I did it once I'm home.
Edit: Here's my compose.yml (I use podman-compose
):
services:
jellyfin:
image: lscr.io/linuxserver/jellyfin:latest
container_name: jellyfin
dns:
- 9.9.9.9
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Berlin
volumes:
- ./config:/config:Z
- ~/drive/media:/media:z
devices:
- /dev/dri:/dev/dri
ports:
- 8096:8096
- 7359:7359/udp
- 1900:1900/udp
restart: unless-stopped
thanks! that seems in line with what i'm doing, though my container is rootful.
Can the peertube user actually read the mapped /dev/dri path?
what i'm so surprised about is that it works for owncast, and the setup is the same.
rootful. render group isn't named in the container and the owncast user isn't in the group.
but it works, and peertube doesn't.
this is a great thought and i'm not sure, probably not.
when i examine /dev/dri in the container, it has the groupid that it has on host, but not the name. peertube user is not in that group.
i tried making the render group in the container with the same gid and added peertube to it, but it didn't change anything. this process may not be correct, however, to achieve that goal.
any suggestions for quadlet on how to bring in the render group and add container peertube user to it?
Are you using rooted or rootless podman? I'm running rootless and am quite sure I needed to add my local user to the video group. I'm out and about, but can investigate later if you want. Otherwise you seem on the right track
the container is rootful.
any help is appreciated as i'm at a wall. :/
I'm using rootless podman, not sure if that will make a big difference.
Add the user running the containers to the video using the following command:
sudo usermod -a -G video [username]
Then I have this in my quadlet for the containers that need HW acceleration. As I understand it, keep-groups means the user rights to use video resources will be passed from the OS into the container.
AddDevice=/dev/dri/renderD128:/dev/dri/renderD128
AddDevice=/dev/dri/card0:/dev/dri/card0
PodmanArgs=--group-add keep-groups
I don't think I have anything else relevant in my set up. Hope it helps!
thank you, i will try!
what GPU are you using, btw?
Hope you have some success 🙂 Mine isn't discrete, I just have an AMD Ryzen 7 4700U and I'm running off the integrated Vega graphics.
i'm starting to think it's the debian base of this container image. it may just be too out of date for my GPU.