
Estou rodando o Ubuntu 20.04 e tenho uma placa Quadro M2000, rodando $ nvidia-smi -L
dá,
GPU 0: Quadro M2000 (UUID: GPU-df3aa58b-eac2-2d70-3e96-8915f899997e)
Eu queria usá-lo para python, então instalei numba
usando $ pip install numba
e verifiquei nvcc -v
que me pediu para instalá-lo.
Ao instalá-lo, estou recebendo os seguintes erros:
$ sudo apt install nvidia-cuda-toolkit
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
nvidia-cuda-toolkit : Depends: nvidia-profiler (= 10.1.243-3) but it is not going to be installed
Depends: nvidia-cuda-dev (= 10.1.243-3) but it is not going to be installed
Recommends: nvidia-visual-profiler (= 10.1.243-3) but it is not going to be installed
Recommends: nsight-compute (= 10.1.243-3)
Recommends: nsight-systems (= 10.1.243-3)
E: Unable to correct problems, you have held broken packages
Os drivers que instalei são os 390 (verificados no site da nvidia para drivers M2000). Tentei instalar alguns desses pacotes manualmente, mas não funcionou.
Então, segui novamente os passosBaixar NVIDIA CUDApara instalar o cuda.
Depois disso, decidi verificar numba
,
>>> import numba
>>> numba.__version__
'0.56.2'
Ok, então numba
foi instalado corretamente,
>>> from numba import cuda
>>> print(cuda.gpus)
```Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/luce/.local/lib/python3.8/site-packages/numba/cuda/cudadrv/devices.py", line 43, in __str__
return ', '.join([str(d) for d in self.lst])
File "/home/luce/.local/lib/python3.8/site-packages/numba/cuda/cudadrv/devices.py", line 26, in __getattr__
numdev = driver.get_device_count()
File "/home/luce/.local/lib/python3.8/site-packages/numba/cuda/cudadrv/driver.py", line 417, in get_device_count
self.cuDeviceGetCount(byref(count))
File "/home/luce/.local/lib/python3.8/site-packages/numba/cuda/cudadrv/driver.py", line 288, in __getattr__
raise CudaSupportError("Error at driver init: \n%s:" %
numba.cuda.cudadrv.error.CudaSupportError: Error at driver init:
Call to cuInit results in UNKNOWN_CUDA_ERROR (803):
Como posso esperar resolver isso?