Mxnet-gluoncv with CUDA support issue

Hi,
I’m trying to install GluonCV on a server with Ubuntu 18.04 I access through ssh.
I checked the installed CUDA version with:

nvcc --version

and I got:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Nov__3_21:07:56_CDT_2017
Cuda compilation tools, release 9.1, V9.1.85

So, I created a virtual environment and installed with:

conda create --name gluon python=3.6
pip install --upgrade mxnet-cu91mkl gluoncv

Everything works fine, but if I try to run some code, it gives me the error:

File "/home/carlo/.conda/envs/gluon/lib/python3.6/site-packages/gluoncv/__init__.py", line 20, in <module>
"Unable to import dependency mxnet. "
ImportError: Unable to import dependency mxnet. A quick tip is to install via `pip install mxnet-mkl/mxnet-cu90mkl --pre`. please refer to https://gluon-cv.mxnet.io/#installation for details.

The error message suggests to use “pip install mxnet-cu90mkl --pre”…since I installed with mxnet-cu91mkl, I first tried:

pip install mxnet-cu91mkl --pre

but it says that the requirements are already satisfied. Then, I tried

pip install mxnet-cu90mkl --pre

as suggested, and during the install it gives the error

ERROR: mxnet-cu91mkl 1.2.1.post1 has requirement requests<2.19.0,>=2.18.4, but you'll have requests 2.22.0 which is incompatible.

but otherwise, the installation seems to finish (“Successfully installed mxnet-cu90mkl-1.6.0b20191031 requests-2.22.0”). If I try to run the code again, this time I get the error:

File "/home/carlo/.conda/envs/gluon/lib/python3.6/ctypes/__init__.py", line 348, in __init__
self._handle = _dlopen(self._name, mode)
OSError: libcudart.so.9.0: cannot open shared object file: No such file or directory

Any idea of what I’m doing wrong here?
Thanks!

Didn’t find how to edit the original post, but I fixed it.

Basically, all I had to do was:

pip install --upgrade mxnet-cu90mkl gluoncv
conda install -c anaconda cudatoolkit==9.0

So, it seems I was using the wrong version of mxnet-cuXXmkl, and I was missing the cudatoolkit in my environment.