IAM

OPENSOURCEFAN STUDYING
STUDYINGCOMPUTERSCIENCEANDMATH COMPUTERSCIENCE

Check out the latest superpixel benchmark — Superpixel Benchmark (2016) — and let me know your opinion! @david_stutz

SERIES»Working with Ubuntu«

Installing Jupyter/IPython, Caffe not Finding CUDA, NVIDIDA Login Loop, Monitoring GPU Usage

This series collects tips and tricks for working with Ubuntu: installing Jupyter/IPython, Caffe not finding CUDA, NVidia login loop and monitoring GPU usage.

Ubuntu is a wonderful distribution, but sometimes it can be difficult. Here are some more things I stumbled across.

On Ubuntu 14.04, I installed Jupyter and IPython using pip:

sudo pip install jupyter

However, Jupyter did not have any kernels installed (i.e. was missing the Python 2 kernel in my case). A combination of this and this made the trick. This means that one of the mistakes was using pip instead of pip3 and additionally ipython[notebook] needs to be installed:

sudo pip3 install jupyter
sudo pip3 install -U "ipython[notebook]"

Recently, I reinstalled NVIDIA drivers and CUDA in order to install Caffe (as explained here or here). However, I ran into a problem when Caffe was not finding CUDA during compilation. Apparently, I forgot to update the LD_LIBRARY_PATH, e.g. in ~/.bashrc (see here or here:

export CAFFE_ROOT=/home/username/caffe
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH

While r-einstalling NVIDIA, I also came across the login loop (as described previously in my article on Installing Caffe on Ubuntu 14.04). However, I had difficulties solving the issue, multiple suggestions (e.g. this, this, this and this did not work). Key was installing NVIDIA/CUDA without OpenGL, as described here. However, I could not reproduce this solution, so it might also have been a combination of some of these links ...

Another key insight was how to uninstall the NVIDIA driver again (see here:

# Prints all supported options:
./NVIDIA-Linux-x86-XXX.YY.run --help
# Uninstall the driver:
./NVIDIA-Linux-x86-XXX.YY.run --uninstall

While throubleshooting my CUDA installation, I also came across a very useful tool for monitoring (and checking) the GPU (see here):

nvidia-smi

More from »Working with Ubuntu«:

What is your opinion on this article? Did you find it interesting or useful? Let me know your thoughts in the comments below or using the following platforms:

@david_stutz