I am running into interesting problem here, and cannot find correct answer or workaround. What I want:
run docker container that would support Nvidia hardware usage
run docker container that would support hardware encoding (AV1) for videos
However I run in a problem that I can get only one of them working correctly. If I run: docker run --gpus ‘“all,capabilities=video”’ -it nvidia/cuda:12.9.1-cudnn-runtime-ubuntu22.04 bash
then I have full hardware support, and nvidia-smi returns me all information about GPU. Also all needed libraries works. Except off course ffmpeg encoding, as it states it does miss libnvidia-encode.so.1 library.
But if I run this: docker run --gpus all -it nvidia/cuda:12.9.1-cudnn-runtime-ubuntu22.04 bash
Then i have fully working ffmpeg with libnvidia-encode.so.1 library and etc. However, the nvidia-smi stops working and it stops working on other AI related stuff.
So I am searching for method to combine both of them in order to work correctly. If anyone have any ideas, or a willing to help me in any way, I would be very grateful!
It won’t be an answer, just some notes to help you clarify your issue. You created your topic in the Image Builds category. You even added the “build” tag" and also “windows-containers”. That doesn’t make sense after reading your message since you meniton no image builds and no windows containers, only Ubuntu.
We usually need the following information to understand the issue:
What platform are you using? Windows, Linux or macOS? Which version of the operating systems? In case of Linux, which distribution?
How did you install Docker? Sharing the platform almost answers it, but only almost. Direct links to the followed guide can be useful.
On debian based Linux, the following commands can give us some idea and recognize incorrectly installed Docker:
docker info
docker version
Review the output before sharing and remove confidential data if any appears (public IP for example)
Note, I found that NVIDIA_DRIVER_CAPABILITIES = all environment parameter fixes the problems with not available video encoders.
docker run -d --name containername --gpus all -it -e NVIDIA_DRIVER_CAPABILITIES=all tail -f /dev/null
So my initial problem is solved. However there is still other issues with AWSLinux, as while GPU is detected and video encoding drivers present, but ffmpeg reports that NVENC API version is 12.2, which is older than required 13.0. But nvidia-sma reports that drivers are 550.163.01 which should have 13+ NVENC API. Windows environment and AWS ec2 ubuntu enviroment does not have this issue. Those both of them runs never drivers and 576.88 (pc) and 570.172.08(AWS EC2 g.6 ubuntu 22.04).
AWSlinux nvidia-smi:
Thu Jul 24 07:14:31 2025
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.163.01 Driver Version: 550.163.01 CUDA Version: 12.4 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA L4 On | 00000000:31:00.0 Off | 0 |
| N/A 64C P0 58W / 72W | 1490MiB / 23034MiB | 65% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
+-----------------------------------------------------------------------------------------+
In all cases the docker file that were used are totally the same. Main images for it was:
FROM nvidia/cuda:12.8.0-devel-ubuntu22.04 for builder
FROM nvidia/cuda:12.8.0-runtime-ubuntu22.04 for runtime.
I most likely will move away from AWSLinux, as they only cause problem, but still would like to know why that kind of problem could appear and how to fix it.