Installing PCL + CUDA in Linux Mint 17.3 with XFCE4

Guide to install PCL with CUDA in a brand new PC

Step 1: Installing NVIDIA drivers

Prepare system

First step is to remove old nvidia drivers and download the files for the new ones

sudo apt-get --purge remove nvidia*
mkdir libs
cd ~/libs
mkdir nvidia_installer
cd nvidia_installer
wget http://developer.download.nvidia.com/compute/cuda/7_0/Prod/local_installers/cuda_7.0.28_linux.run
chmod +x cuda_7.0.28_linux.run
./cuda_7.0.28_linux.run -extract=~/libs/nvidia_installer

Disable Nouveau driver

echo "blacklist nouveau" | sudo tee -a /etc/modprobe.d/blacklist.conf
sudo gedit /etc/default/grub

And edit the file modifying this line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"

And update grub:

update-grub

Now reboot the system.

Install new drivers

Use Ctrl+Alt+F1 to go to a terminal screen. Then run the following commands:

sudo service mdm stop
sudo init 3
cd ~/libs/nvidia_installer
sudo ./NVIDIA-Linux-x86_64-346.46.run
sudo modprobe nvidia

Step 2: Install CUDA

From the last step, run the following commands:

sudo ./cuda-linux64-rel-7.0.28-19326674.run
sudo ./cuda-samples-linux-7.0.28-19326674.run
sudo init 5
sudo service mdm start

Now you can either use Ctrl+Alt+F7 to get back to graphical environment or reboot the PC.

Testing that it works

Run:

cd /usr/local/cuda/samples/1_Utilities/deviceQuery
sudo make
sudo ./deviceQuery

And some info about your graphics card will be displayed.

Step 3: Install PCL

I'm still building this section, so it is not trustworthy yet

Add ppa and install deps:

sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl
sudo apt-get update
sudo apt-get build-dep ??

If you happen to be using a distro without the suitable ppa:

sudo apt-get install libboost-all-dev libeigen3-dev libflann-dev libvtk5-dev libusb-1.0.0-dev libopenni-dev

Other libs that might me required:

sudo apt-get install libgl1-mesa-glx freeglut3-dev libxi-dev libxmu-dev
sudo apt-get install libopenni-sensor-primesense0

Get source code for pcl:

git clone [email protected]:PointCloudLibrary/pcl.git

CMake parameters

This is either a question, or an issue, depending on the answer to the question. I have a feb 21 fork of torch, and to get cutorch to build, I have to add the following to flags. ie, cd build, ccmake .., press t for advanced options, and change CMAKE_CXX_FLAGS to -D_FORCE_INLINES

What to do if something goes very wrong (i.e. blue screen of death in GNU/Linux)

If xorg decides that it won't work after this whole process, it means you tried to install the nvidia driver, and it overwrote the open-source version of libglx.so with the proprietary nvidia version, so you need to reinstall the open-source mesa stack.

sudo nvidia-settings --uninstall
sudo apt-get install --reinstall xserver-xorg-video-intel libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core
sudo dpkg-reconfigure xserver-xorg

Sources:

results matching ""

    No results matching ""