The current CUDA Forward Compatibility check relies on a strictly greater driver version. This check is not sufficient as compatibility may depend on a combination of device and major number.
The hook should extend the check above to query the information available in libcuda.so to determine whether libcuda.so in the container should be used. This should not change the mechanism for ensuring that these are used (ld.so.conf.d files), but only the decision logic.