For supported chips, it is as simple as installing the
nvidia-opencl-icd package (from the
non-free component). You can then list OpenCL capabilities by running
clinfo from the
clinfo package. This also works on headless machines.
If you don’t know if your chip is supported, try running
nvidia-detect from the