The cgroups hook configuration file you listed in your initial post lead me to believe you were using the cgroups hook supplied with the PBS Pro package. I made a poor assumption. In this case, if all you want to do is set CUDA_VISIBLE_DEVICES the cgroups hook may be overkill. You may still want to take a look at how it gets set in the cgroups hook. Search for CUDA_VISIBLE_DEVICES and you’ll see the commands that add it to the environment for the job. If you do choose to use the cgroups hook, it is documented in chapter 16 of the admin guide.
You should be able to take the current cgroups hook from master and run it on a 14.x installation, but you will need to import it as though you wrote it yourself. And don’t forget to import the hook configuration file as well.
Thanks,
Mike