Created
May 6, 2016 23:42
-
-
Save ktavabi/5cde1e0362e3e4d5ef280c41281b5bd8 to your computer and use it in GitHub Desktop.
Command history for setting up CUDA on Linux 14.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# query nvidia card | |
lspci -vnn | grep -i VGA -A 12 | |
# install nvidia driver 352.63 | |
sudo apt-get install nvidia-352 | |
sudo reboot | |
# Download OS-Arch CUDA Toolkit package from https://developer.nvidia.com/cuda-downloads | |
cd ~/Downloads | |
wget -O cuda.deb http://developer.download.nvidia.com/compute/cuda/7.5/Prod/local_installers/cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.deb | |
sudo dpkg -i cuda.deb | |
sudo apt-get update | |
sudo apt-get install cuda | |
sudo reboot | |
# Setup verify CUDA install as per http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-linux/index.html#axzz43sPr7vrN | |
# Env setup | |
echo 'export PATH=/usr/local/cuda-7.0/bin:$PATH' >> ~/.bashrc | |
echo 'export LD_LIBRARY_PATH=/usr/local/cuda-7.0/lib64:$LD_LIBRARY_PATH' ~/.bashrc | |
# Install samples | |
cuda-install-samples-7.5.sh ~ | |
cd ~/NVIDIA_CUDA-7.5_Samples/bin/x86_64/linux/release/ | |
./deviceQuery | |
cd ~/NVIDIA_CUDA-7.5_Samples/ | |
# Verify CUDA driver & Toolkits versions | |
cat /proc/driver/nvidia/version | |
nvcc -V | |
# Compile & run tests | |
make -C 1_Utilities/bandwidthTest | |
sudo 1_Utilities/bandwidthTest/bandwidthTest | |
make -C 0_Simple/vectorAdd | |
sudo 0_Simple/vectorAdd/vectorAdd | |
make -C 2_Graphics/Mandelbrot | |
sudo 2_Graphics/Mandelbrot/Mandelbrot | |
# Add to bash config | |
export CUDA_HOME=/usr/local/cuda-7.5 | |
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64 | |
PATH=${CUDA_HOME}/bin:${PATH} | |
export PATH | |
### Optional - setup test PyCUDA & SCIKITS-CUDA using system python ### | |
# Install PyCuda 2016.1 as per https://wiki.tiker.net/PyCuda/Installation/Linux | |
sudo apt-get install libboost-all-dev | |
sudo apt-get install build-essential python-dev python-setuptools libboost-python-dev libboost-thread-dev -y | |
sudo apt-get install python-numpy -y | |
wget https://pypi.python.org/packages/source/p/pycuda/pycuda-2016.1.tar.gz | |
mkdir ~/CustomBuilds | |
mv ~/Downloads/pycuda-2016.1.tar.gz CustomBuilds/ | |
cd ~/CustomBuilds | |
tar xzvf pycuda-2016.1.tar.gz | |
cd pycuda-2016.1/ | |
./configure.py --cuda-root=/usr/local/cuda --cudadrv-lib-dir=/usr/lib/x86_64-linux-gnu --boost-inc-dir=/usr/include --boost-lib-dir=/usr/lib --boost-python-libname=boost_python --boost-thread-libname=boost_thread --no-use-shipped-boost | |
make -j 4 | |
sudo python setup.py install | |
# install pip as per https://pip.pypa.io/en/stable/installing/ | |
wget https://bootstrap.pypa.io/get-pip.py | |
python ~/Downloads/get-pip.py | |
sudo python ~/Downloads/get-pip.py | |
sudo pip install . | |
python test_driver.py | |
# Install SCIKIT-CUDA | |
cd ~/CustomBuilds | |
git clone https://github.com/lebedov/scikit-cuda.git | |
cd scikit-cuda/ | |
python setup.py install --user | |
#ANACONDA python 2.7 64-bit linux installer from https://www.continuum.io | |
cd ~/Downloads | |
wget -O Anaconda.sh https://3230d63b5fc54e62148e-c95ac804525aac4b6dba79b00b39d1d3.ssl.cf1.rackcdn.com/Anaconda2-2.5.0-Linux-x86_64.sh | |
bash Anaconda.sh | |
conda install numpy scipy mkl | |
#Install PyCuda & SCIKIT-CUDA in ANACONDA env | |
pip install pycuda | |
pip install scikit | |
sudo apt-get install nvidia-modprobe | |
# mne-python | |
cd ~Projects/ | |
git clone git://github.com/mne-tools/mne-python.git | |
cd mne-python/ | |
python setup.py develop | |
MNE_LOGGING_LEVEL=info MNE_USE_CUDA=true nosetests mne/tests/test_filter.py:test_cuda -s | |
python -c "import mne; mne.utils.set_config('MNE_USE_CUDA', 'true');" # if test succeeds |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@mrjeffs