Closed chandrashekar-nallamilli closed 8 months ago
I also see this error.
My system specs:
Linux p40 6.1.0-17-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.69-1 (2023-12-30) x86_64 GNU/Linux
I built the container like this:
docker build https://github.com/AirenSoft/OvenMediaEngine/raw/v0.16.4/Dockerfile.cuda \
--build-arg OME_VERSION=v0.16.4 \
-t docker.io/$docker_username/$docker_repo:ome-official-v0.16.4-cuda11
I also see that my system doesn't have libnppig.so.11
anywhere, but there is /usr/local/cuda-12.3/targets/x86_64-linux/lib/libnppig.so.12
.
So I tried building the container with CUDA 12 (I modified the Dockerfile to use CUDA 12.2.0 instead of 11.4.3):
docker build - < ./video/ome/nvidia/Dockerfile.cuda \
--build-arg OME_VERSION=v0.16.4 \
-t docker.io/$docker_username/$docker_repo:ome-official-v0.16.4-cuda12
Just in case, I made sure to run the container with NVIDIA_DRIVER_CAPABILITIES=all
.
Unfortunately, the error is the same, except the file name is a bit different:
/opt/ovenmediaengine/bin/OvenMediaEngine: error while loading shared libraries: libnppig.so.12: cannot open shared object file: No such file or directory
Version 1.16.3 didn't have this issue.
Thank you for reporting. I'm sorry for my late reply.
Recently, I changed the code to use the libnpp library in OME.
If you have time, could you test it by changing the CUDA build script as shown below and let me know the results?
Dockerfile.cuda
ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility,video,compat32
=>
ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility,video,compat32,graphics
The above code binds the NVIDIA library on the host when running Docker Image. It is expected that the CAPABILITIES property value called graphics will bind the libnppig.so file.
Then I'll wait for good news. Thanks for your help.
Reference : https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/1.10.0/user-guide.html
could you test it by changing the CUDA build script as shown below and let me know the results?
Unfortunately, it doesn't seem to change anything.
root@ovenmediaengine-7958d6df66-8s22j:/opt/ovenmediaengine/bin# env | grep NVIDIA_DRIVER_CAPABILITIES
NVIDIA_DRIVER_CAPABILITIES=compute,utility,video,compat32,graphics
root@ovenmediaengine-7958d6df66-8s22j:/opt/ovenmediaengine/bin# /opt/ovenmediaengine/bin/OvenMediaEngine -c origin_conf
/opt/ovenmediaengine/bin/OvenMediaEngine: error while loading shared libraries: libnppig.so.12: cannot open shared object file: No such file or directory
I tried to check what NVIDIA_DRIVER_CAPABILITIES
actually does to a container.
It doesn't seem to change the list of available libraries.
The list of CUDA libraries stays the same regardless of NVIDIA_DRIVER_CAPABILITIES
.
nvidia-smi
is not available when env doesn't contain utility
. Maybe there are some other changes but I don't see them in the file system.
Also, when I tried running pure alpine
container, libraries are not injected at all. I guess they are only present in OME container because it is using nvidia/cuda:12.2.0-base-ubuntu20.04
as base? Maybe nvidia container runtime replaces existing stub libraries with proper libraries, but doesn't add new ones?
I can't quite find any details on this in google.
Maybe there is something wrong with my container runtime setup? I can't tell.
I did setup the container runtime using instructions from nvidia website, and I re-checked that everything is still alright.
OME 1.16.3 runs just fine with hardware acceleration (well, except thumbnail generation is not working, but it's not related to this issue).
Also, nvcr.io/nvidia/k8s/cuda-sample:vectoradd-cuda10.2
, which nvidia suggests to use to test if CUDA is available in container, runs without any issues.
@d-uzlov Thank you for testing in detail. I will fix the problem of not being able to bind libnppig.so file to Docker Container. I think it will take a few days. Please understand. I will contact you when the problem is resolved.
@d-uzlov
I've finally solved it due to my busy work schedule. The problem of not finding the libnppig.so file has been corrected as follows.
https://github.com/AirenSoft/OvenMediaEngine/compare/f38d3c1a180e...4b297cc97fbc
You can change Docker's base image from base -> runtime in the Dockerfile.cuda and Dockerfile.cudal.ocal scripts. Please test it and let me know the results.
I hope you have a nice day.
Thank you @Keukhan for looking into the issue , @d-uzlov for testing it . I can confirm its is working after making the suggested changes from our side Have a nice day
The problem is solved when using runtime
cuda images.
It's a bit unfortunate that image size goes from ~500 MB to ~2500 MB (uncompressed). I guess it's not too big of a deal but maybe it would be possible to optimize it in the future.
Thank you for solving this.
Describe the bug I am using srt ingest to webrtc playback on ovenmedia using docker . Trying to enable Hardware acceleration
To Reproduce Steps to reproduce the behavior:
'
Expected behavior A clear and concise description of what you expected to happen. The gpu should be used for hardware acceleration but i cant start the images
Logs /opt/ovenmediaengine/bin/OvenMediaEngine: error while loading shared libraries: libnppig.so.11: cannot open shared object file: No such file or directory /opt/ovenmediaengine/bin/OvenMediaEngine: error while loading shared libraries: libnppig.so.11: cannot open shared object file: No such file or directory /opt/ovenmediaengine/bin/OvenMediaEngine: error while loading shared libraries: libnppig.so.11: cannot open shared object file: No such file or directory
Server (please complete the following information):
Player (please complete the following information):