Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cuda compile ffmpeg #482

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Cuda compile ffmpeg #482

wants to merge 1 commit into from

Conversation

ToshY
Copy link
Contributor

@ToshY ToshY commented Jul 3, 2024

Related #480


Hey @wader 👋

This seems this really out of my league. I don't know what to do to even get this to compile right now, but I thought I'll just add the draft here for now anyway.

Issue 1

The install guide shows to install the following packages needed:

sudo apt-get install build-essential yasm cmake libtool libc6 libc6-dev unzip wget libnuma1 libnuma-dev

I'm not sure what the libc6 libc6-devlibnuma1 libnuma-dev equivalents are on Alpine, but that's my first roadblock.

Issue 2

Looking at some other FFmpeg Dockerfiles for CUDA support, I see a lot using either nvidia/cuda (ubuntu) or normal ubuntu as base image. Almost makes me think it is either not easy, or not possible to compile for Alpine (?).

Issue 3

One of the other things in the installation guide, is to configure with --enable-nonfree. Now I saw that for libfdk_aac this was denoted in the README that you should build the image yourself, and it also has the --enable-nonfree flag. Would this pose an issue here as well?

@wader
Copy link
Owner

wader commented Jul 4, 2024

Related #480

Hey @wader 👋

This seems this really out of my league. I don't know what to do to even get this to compile right now, but I thought I'll just add the draft here for now anyway.

Issue 1

The install guide shows to install the following packages needed:

sudo apt-get install build-essential yasm cmake libtool libc6 libc6-dev unzip wget libnuma1 libnuma-dev

I'm not sure what the libc6 libc6-devlibnuma1 libnuma-dev equivalents are on Alpine, but that's my first roadblock.

Yeah this will be a mess probably, not sure there is any sane way to link an executable that include two libc variants. So anything that require gnu libc etc or sdk:s that are only shared object (*.so) or archives (*a.) files that require some variants of libc that is not musl i think will be hard :(

Issue 2

Looking at some other FFmpeg Dockerfiles for CUDA support, I see a lot using either nvidia/cuda (ubuntu) or normal ubuntu as base image. Almost makes me think it is either not easy, or not possible to compile for Alpine (?).

Mm i guess same a above, if it's not open source or require gnu libc, will be a mess.

Issue 3

One of the other things in the installation guide, is to configure with --enable-nonfree. Now I saw that for libfdk_aac this was denoted in the README that you should build the image yourself, and it also has the --enable-nonfree flag. Would this pose an issue here as well?

This we can probably figure out somehow if it turn out it is possible to link things somehow.

So in summary i think at least at the moment it's hard to link a static binary that includes things that don't work with musl. One solution i guess is to create a different image that links statically with gnu libc etc but that has other issues. My advice (and how i use this Dockerfile in some places) is to use it as a starting point, strip things you don't need, and then build using a different base image and compiler toolchains etc that is gnu libc based if that is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants