Testing waters with RAPIDS AI – 2

This post is the second part in setting up of RAPIDS AI on a ASUS laptop. You can find the first part here. So, after the setup I was ready to go forward with the RAPIDS container, However, I was faced with this error :

$ docker run –gpus all –rm -it -p 8888:8888 -p 8787:8787 -p 8786:8786 rapidsai/rapidsai:cuda10.1-runtime-ubuntu18.04-py3.7
docker: Error response from daemon: could not select device driver “” with capabilities: [[gpu]].

CUDA seems to be working fine:

$ nvcc –version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_19:24:38_PDT_2019
Cuda compilation tools, release 10.2, V10.2.89

The driver is working as well, However, docker does not seem to be recognizing the gpu. Docker version 19.03 onwards have inbuilt NVIDIA capabilities and my Docker version is 19.03.3. So we are good there. I believe the issue is the “nvidia-container-toolkit“. There was the issue of using 19.10 version again, since the highest Ubuntu version that is supported is 18.04. So, replaced dist variable with 18.04 in the commands from the website :

# Add the package repositories
$ distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
$ curl -s -L | sudo apt-key add -
$ curl -s -L$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list

$ sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit
$ sudo systemctl restart docker

Now, lets test docker again with the command :

$ docker run -it –rm –gpus all ubuntu nvidia-smi

Docker gpu test – slightly concerned about CUDA Version showing “N/A”

And Voila !!!

Next, I had to run the Jupyter notebook server manually using: “bash /rapids/notebooks/utils/”. And going to on the browser leads to the right place.

RAPIDS Jupyter notebook

Now onto doing some real stuff. Will update with more soon.


Testing waters with RAPIDS AI – 1

Hello everyone, this is the first blog post on Takksol. This post will describe the process of setting up a laptop with RAPIDS AI setup for gpu (NVIDIA only :P) based machine learning on the go. So, the laptop here is a ASUS S410U with the following specs:

  • Intel® Core™ i7 8550U Processor,
  • 24 GB DD4 (8GB Onboard + 16 GB stick)
  • 512Gb M.2 SSD
  • Nvidia GeForce MX150 (2GB GDDR5 VRAM)

The key piece here is the dedicated GPU, even though its a low end gpu but it works to do some gpu modelling work on the go and finalize on the workstation later. In the past (way back during early grad school), I have worked on OpenCL and NVIDIA cuda libraries such as cuFFT. And my conclusion back then was that its cool with big datasets but a lot of overhead for small data sets in moving data around and an even bigger overhead (headache) of coding for it. Of course, back then it was native coding so it was harder. Granted things have improved since then, I tried the Tensorflow instance with gpu which worked but RAPIDS seemed like a neat idea. Now, RAPIDS is a new suite of libraries to do data related tasks natively on GPU and reduce data movement overhead. It should work very well with NVIDIA gpus with large amounts of RAM. SO, to dip my toes in, Im starting with trying it out on my laptop running Lubuntu 19.10. This blogpost might get long, so will break it up into parts. Enough chit chat, lets goto work.

First things first, let’s look at the prerequisites (from here):

  • Now, we have a compatible gpu (presumably this page should list it but it doesn’t).
  • OS? Lubuntu should have most Ubuntu basics but we have 19.10 and it lists 18.04 as the latest, let’s hope this will work.
  • Docker? Decided to just install natively instead of container approach (all in or nothing :P)
  • CUDA/NVIDIA drivers? Lubuntu 19.10 was a big step towards this, using nvidia driver 440 metapackage. But need to install CUDA.

CUDA installation: I decided to follow NVIDIA website directions instead of installing cuda toolkit from ubuntu repository.

Had to add the PATH to cuda binaries to the last line of my ~/.bashrc file so I don’t have to update the PATH variable everytime and voila my nvcc –version shows :

Now the next part is getting Docker installed. I followed the official directions for that from here. Only issue here was the fact that they don’t have a docker stable version for 19.10, so I followed directions for 19.04. Next step is to get the RAPIDS docker container itself from here. My selections were as shown below:

Getting DOCKER container

Now we are all ready,In the next part we will discuss moving forward from here. Happy rapiding …