Amazon Linux + GRID K520 + FFMPEG

Hi,

I am working on a project that uses FFMPEG. I have decided to align all my Operating Systems to use Amazon Linux for the sake of management.

On the AWS Marketplace I have suscribed to the NVIDIA released ami to run on G2 (Graphical instances) that uses the GRID K520.

The drivers are already provided on those AMI as well as some pacakges for CUDA 7.5 (below the different packages details).

sudo rpm -qa | grep nvidia
nvidia-352.79-2016.03.102.amzn1.x86_64
nvidia-dkms-352.79-2016.03.102.amzn1.x86_64

 sudo yum info nvidia-352.79-2016.03.102.amzn1.x86_64
Loaded plugins: dkms-build-requires, priorities, update-motd, upgrade-helper
2 packages excluded due to repository priority protections
Installed Packages
Name        : nvidia
Arch        : x86_64
Epoch       : 2
Version     : 352.79
Release     : 2016.03.102.amzn1
Size        : 185 M
Repo        : installed
Summary     : NVIDIA userspace graphics card driver and libraries
URL         : http://www.nvidia.com/object/unix.html
License     : NVIDIA
Description : This package contains the userspace components of the NVIDIA driver. This
            : includes libraries specialized to use the GPU for computation. The libraries
            : included are
            :
            : * CUDA
            : * OpenCL
            : * OpenGL
            : * VDAPU


sudo rpm -qa | grep cuda
cuda-samples-7.5.18-1.16.amzn1.x86_64
cuda-docs-7.5.18-1.16.amzn1.noarch
cuda-7.5.18-1.16.amzn1.x86_64

sudo yum info cuda-7.5.18-1.16.amzn1.x86_64
Loaded plugins: dkms-build-requires, priorities, update-motd, upgrade-helper
2 packages excluded due to repository priority protections
Installed Packages
Name        : cuda
Arch        : x86_64
Version     : 7.5.18
Release     : 1.16.amzn1
Size        : 1.3 G
Repo        : installed
Summary     : CUDA Tool Kit
URL         : https://developer.nvidia.com/cuda-toolkit
License     : NVIDIA
Description : CUDA Toolkit
            : * C/C++ compiler
            : * cuda-gdb debugger
            : * CUDA profiler
            : * GPU-accelerated BLAS library
            : * GPU-accelerated FFT library
            : * GPU-accelerated Sparse Matrix library
            : * GPU-accelerated RNG library
            : * GPU-accelerated Open64 library
            : * Additional tools and samples

I have compiled FFMPEG with all the necessary libraries, and got the NvEncoderApi.h from the SDK (Video_Codec_SDK_7.0.1). The CUDA libraries are all already here.

But, I am getting errors with FFMPEG on run : Snippet | IRCCloud

So, for the sake of trying, I removed the drivers installed with the AMI and re-installed the exact same version from the NVIDIA run script (NVIDIA-Linux-x86_64-352.79.run)

After recompiling, it didnt seem to work either and still getting the same issue.

FFMPEG was compiled with the following options : ./configure --prefix=“/opt/ffmpeg_build” --extra-cflags=“-I/opt/ffmpeg_build/include” --extra-ldflags=“-L/opt/ffmpeg_build/lib” --bindir=“/opt/bin” --extra-libs=-ldl --enable-version3 --enable-libvp
x --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --disable-ffplay --enable-gpl --enable-nvenc --disable-doc

Has anyone any idea of what is going wrong and how we could get it running on Amazon Linux ?
I would like to avoid Ubuntu, I have a preference for CentOS/RH OS generally speaking, but thought it would be better to go for AWS’ own distribution …

Thanks a lot in advance.