First, I should be clear that this was done on a G2 AWS instance and I started with working nvidia support by following http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cluster_computing.html
From that (or if you're feeling more bold), the thing to take is getting the right binary install package and running it. Look at http://www.nvidia.com/object/unix.html and get the package you want (at the time, I'm using 'Latest Long Lived Branch version: 361.45.11'), then run the file you get. For example, sudo sh ./NVIDIA-Linux-x86_64-361.45.11.run
.
I do not have time to test on a clean instance so you may need a bit more setup that I've not mentioned and I make no guarantees anyway since I hardly know what I'm doing here :)
The ffmpeg_build.sh script was mostly copy/paste from the guide at https://trac.ffmpeg.org/wiki/CompilationGuide/Centos and with significant help from folks on FreeNode #ffmpeg (notably furq and JEEB though there were others).
The steps for adding OpenCL headers support was borrowed from https://wiki.tiker.net/OpenCLHowTo#Installing_the_Nvidia_ICD
The OpenCL version I used was found by looking at https://www.khronos.org/registry/cl/, then finding the root url for the appropriate opencl.h link
To help me know which libraries I should be building (steps prior to actually building ffmpeg), I needed to know what was build-in (for endcoding in particular) and that can be found at: https://ffmpeg.org/general.html#Supported-File-Formats_002c-Codecs-or-Features