conflict between ubuntu 18.04 repository python numba and nvidia-cuda-toolkit?

When I installed ubuntu (the mate variant, but I don’t think it matters) 18.04, I was quite happy to see that there was now full repository support for nvidia cuda and python numba, which used to be a pain to install in former versions.

I have the nividia-driver-390 (proprietary), I have the repository cuda installation, the repository python-3 numba installation, and the repository nvidia-cuda-toolkit installation.

Cuda works, in the sense that nvcc can compile and execute examples in C code. Numba works, in the sense that I can use @jit and have CPU acceleration. Pycuda works. I can use pycuda in python3 and have it use cuda.

However, numba is also supposed to allow GPU acceleration through cuda, and that fails. When I execute a simple example, at the end of a long trace of errors, I have:

RuntimeError: Missing libdevice file for compute_35. Please ensure you have package cudatoolkit 7.5.    Install package by:  conda install cudatoolkit=7.5 

However, I didn’t use conda to install numba, I used the repository. And it seems that the cudatoolkit from the respository is version 9.1, not 7.5.

Some browsing learned me that the culprit is that the executable code installed with numba was compiled against cudatoolkit libraries 7.5 and not the repository-installed ones 9.1.

What is the cleanest way to solve this ? Preferentially I like to keep as close to the official repositories as possible.