wader / static-ffmpeg

Multi-arch docker image with ffmpeg/ffprobe binaries built as hardened static PIE binaries with no external dependencies
https://hub.docker.com/r/mwader/static-ffmpeg/
MIT License
260 stars 62 forks source link

[Enhancement] Support for CUDA #480

Open ToshY opened 3 months ago

ToshY commented 3 months ago

I was trying to run FFmpeg and passing --gpus all flag to the docker container, just to realise that the image does not support it yet (which I later read in the "todos" section in the README).

Any chance to compile FFmpeg with CUDA?

https://docs.nvidia.com/video-technologies/video-codec-sdk/12.0/ffmpeg-with-nvidia-gpu/index.html#compiling-for-linux


If you do not have time to do it yourself, I can try to take a shot at it (but it might take me a while to understand and fix it). Let me know.

wader commented 3 months ago

Hey, yes that would be nice to support. I've only briefly looked at it some years ago but then concluded that at least for some of the GPU and CUDA libraries it didn't seem possible to produce a static binary. But please if you feel motivated have a look again and see how it looks!

wader commented 3 months ago

Now i remembered another possible issue: libs not linked with musl might be challenging.

examedia-video-engineering commented 1 month ago

Can also Intel drivers be added for Intel ARC GPUs transcoding acceleration?

wader commented 1 month ago

@examedia-video-engineering Hello, i have no experience using them but if the software needed is open source, can be built with musl libc and be link statically it should be work. Want to look into it? either do a PR or do research what packages would be needed and so on. I'm happy to help out.

examedia-video-engineering commented 1 month ago

Sounds good, i'll gather Intel ARC driver information, add it to your Dockerfile to test, and will report back if it works.

Off topic: What would you reccomend to troubleshoot docker build ? If there's an error with "checkdupsym" for example. Any way to open up alpine build docker and shell into it?

wader commented 1 month ago

👍 When working on something i usually take the Dockerfile and strip out everything unrelated and also strip away everything after building ffmpeg, this way the build state kept and also have a shell. Now build the image and run it to get a dev env. In your case i think you can strip all tests for now, including checkdupsym. checkdupsym should only be needed to check for dup syms for rust based libraries.