SOLVED: Can't access GPU in docker container - Printable Version +- Jellyfin Forum (https://forum.jellyfin.org) +-- Forum: Support (https://forum.jellyfin.org/f-support) +--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting) +--- Thread: SOLVED: Can't access GPU in docker container (/t-solved-can-t-access-gpu-in-docker-container) |
Can't access GPU in docker container - creylon - 2024-04-29 Hi, I am trying to run the unstable branch with hardware acceleration. I have an AMD GPU. Here is my docker config: Code: jellyfin-beta: When I run Code: docker exec -it jellyfin-beta /usr/lib/jellyfin-ffmpeg/vainfo --display drm --device /dev/dri/renderD128 I get the following error: Code: Trying display: drm This error occurs as of unstable build 2024032505. With previous builds everything works fine. I run another jellyfin instance with stable branch and same configuration without issues. Thanks RE: Can't access GPU in docker container - TheDreadPirate - 2024-04-29 Try swapping out /dev/dri/card0 with "/dev/kfd". RE: Can't access GPU in docker container - creylon - 2024-04-29 So I tried Code: devices: and Code: devices: neither worked, same error. I don't use OpenCL btw RE: Can't access GPU in docker container - TheDreadPirate - 2024-04-29 Just realized you're using a month old build. Can you re-pull the image and grab today's build? 2024042905 RE: Can't access GPU in docker container - creylon - 2024-04-29 I am using unstable tag for the image, which has the latest build from today. The error occurs first with build 2024032505. So in build 2024031805 this config works fine. RE: Can't access GPU in docker container - TheDreadPirate - 2024-04-29 What GPU is in your system? I spun up unstable on my desktop with an RX6800 and it appears to transcode as expected with vulkan. Code: /usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -probesize 1G -init_hw_device drm=dr:/dev/dri/renderD128 -init_hw_device vaapi=va@dr -init_hw_device vulkan=vk@dr -filter_hw_device vk -hwaccel vaapi -hwaccel_output_format vaapi -noautorotate -i file:"/media/library/Anime Movies/5 Centimeters per Second (2007)/5 Centimeters per Second.mkv" -noautoscale -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:1 -map -0:s -codec:v:0 h264_vaapi -rc_mode VBR -b:v 17895107 -maxrate 17895107 -bufsize 35790214 -sei -a53_cc -force_key_frames:0 "expr:gte(t,n_forced*3)" -vf "setparams=color_primaries=bt709:color_trc=bt709:colorspace=bt709,scale_vaapi=format=nv12" -codec:a:0 libfdk_aac -ac 2 -ab 256000 -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type fmp4 -hls_fmp4_init_filename "64f6bedc7a7eec0752e5ac99bd812839-1.mp4" -start_number 0 -hls_segment_filename "/config/transcodes/64f6bedc7a7eec0752e5ac99bd812839%d.mp4" -hls_playlist_type vod -hls_list_size 0 -y "/config/transcodes/64f6bedc7a7eec0752e5ac99bd812839.m3u8" Code: root@optimus-maximus:/docker/jellyfin/jellyfin-data/config/log# docker exec -it jellyfin /usr/lib/jellyfin-ffmpeg/vainfo --display drm --device /dev/dri/renderD128 My docker compose for reference. Code: services: I am not specifying the device, just providing the whole /dev/dri folder. I noticed you were using renderD129, do you have more than one device? Perhaps an Intel iGPU? RE: Can't access GPU in docker container - creylon - 2024-04-29 I've got a Ryzen 5 5600G which has builtin GPU and a dedicated Radeon RX 5500. As I want to use the dedicated GPU I map renderD129. I mapped the devices like you did: Code: devices: Now it works. I don't understand why that would make a difference, but thanks for the help RE: Can't access GPU in docker container - TheDreadPirate - 2024-04-29 Yep. Since you can specify the render device with VAAPI you can still tell it to use renderD129 that way. Why that makes a difference, IDK. |