Setting up CUDA development in Ubuntu 9.04

I recently got a new computer, and it features a Nvidia GT 230 graphics card. So of course, I want to play with it.

Please note that this is for a AMD64 setup, it might be different for a x86 setup.

Setting up the development environment gave me some headaches, but now it works, and here is how I did it.

Install the Nvidia 190.25(beta) drivers

sudo -s
echo deb http://ppa.launchpad.net/nvidia-vdpau/ppa/ubuntu jaunty main >> /etc/apt/sources.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CEC06767
aptitude update
apt-get install nvidia-190-modaliases nvidia-glx-190
reboot

Install the CUDA toolkit and SDK

sudo aptitude install build-essential libglut3-dev
mkdir ~/nvidia
cd ~/nvidia
wget http://developer.download.nvidia.com/compute/cuda/2_3/toolkit/cudatoolkit_2.3_linux_64_ubuntu9.04.run
wget http://developer.download.nvidia.com/compute/cuda/2_3/sdk/cudasdk_2.3_linux.run
chmod +x *
sudo ./cudatoolkit_2.3_linux_64_ubuntu9.04.run # just press enter whenever you are prompted
./cudasdk_2.3_linux.run # again, just press enter
cd ..
rm -r ~/nvidia
echo "PATH=$PATH:/usr/local/cuda/bin
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64
export PATH
export LD_LIBRARY_PATH" >> ~/.bashrc

That should be it. To test it, compile the sdk samples.

cd ~/NVIDIA_GPU_Computing_SDK/C
make
~/NVIDIA_GPU_Computing_SDK/C/bin/linux/release/deviceQuery

Written by Jannich Brendle tir 20 oktober 2009 In How to

tags: cudadevelopmentlinuxubuntu

Related posts

social