Cannot use Nvidia Runtime in Docker Since Update to Fedora 42

Thank you for responding!

I come from debian and using this container was the most reliable way I could get my hands on the latest and greatest ffmpeg (with all the latest codecs) without bricking my install :melting_face:. I do sometimes use my GPU for hardware accelerated encoding / decoding so that’s why I’m passing the --gpus flag.

When I installed Bluefin, I did try the built-in FFMPEG but it doesn’t have the NVENC encoders compiled so I didn’t dive further into it since I already had a pretty good solution with that docker image.

I did try the podman command you suggested and it does appear to work just fine:

[Vector addition of 50000 elements]
Copy input data from the host memory to the CUDA device
CUDA kernel launch with 196 blocks of 256 threads
Copy output data from the CUDA device to the host memory
Test PASSED

Seeing how this command worked, I modified it to run the same docker image:

podman run \
  --user 1000:1000 \
  --security-opt=no-new-privileges \
  --cap-drop=ALL \
  --security-opt label=type:nvidia_container_t  \
  --device=nvidia.com/gpu=all \
  -v $(pwd):/config \
  linuxserver/ffmpeg

Note: Removing the --security-opt and --cap-drop flags works just fine too.

Alternative command
podman run \
  --user 1000:1000 \
  --device=nvidia.com/gpu=all \
  -v $(pwd):/config \
  linuxserver/ffmpeg

The container was able to launch successfully:

ffmpeg version 7.1.1 Copyright (c) 2000-2025 the FFmpeg developers
  built with gcc 13 (Ubuntu 13.3.0-6ubuntu2~24.04)
  configuration: --disable-debug --disable-doc --disable-ffplay --enable-alsa --enable-cuda-llvm --enable-cuvid --enable-ffprobe --enable-gpl --enable-libaom --enable-libass --enable-libdav1d --enable-libfdk_aac --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-libkvazaar --enable-liblc3 --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libplacebo --enable-librav1e --enable-librist --enable-libshaderc --enable-libsrt --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpl --enable-libvpx --enable-libvvenc --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-nonfree --enable-nvdec --enable-nvenc --enable-opencl --enable-openssl --enable-stripping --enable-vaapi --enable-vdpau --enable-version3 --enable-vulkan
  libavutil      59. 39.100 / 59. 39.100
  libavcodec     61. 19.101 / 61. 19.101
  libavformat    61.  7.100 / 61.  7.100
  libavdevice    61.  3.100 / 61.  3.100
  libavfilter    10.  4.100 / 10.  4.100
  libswscale      8.  3.100 /  8.  3.100
  libswresample   5.  3.100 /  5.  3.100
  libpostproc    58.  3.100 / 58.  3.100
Universal media converter
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'

So it sounds like a decent workaround to just update my alias in my .bashrc file but I am also very curious to understand why docker is trying to load a module from the previous nvidia driver.

Any idea as to how I could cleanup these old drivers?

1 Like