Last active
October 1, 2019 07:20
-
-
Save VibhuJawa/3eaead6caef195fbe2340b71042f954a to your computer and use it in GitHub Desktop.
DataPROC nvidia-driver installation
This file contains hidden or 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
### Problem Diagnosis: | |
# The current problem is the disparity in the linux-kernel version and | |
# linux-kernel header version | |
# we dont have the required linux-header kernel version | |
# if we upgrade to 4.9.0-11 from 4.9.0-9 | |
# it seems to work | |
# dont know if that is allowed so stopping work before making more progress | |
## below scripts allows you to do a successful nvidia-smi installation | |
### Upgrade linux version | |
sudo apt-get update --fix-missing | |
sudo DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade | |
sudo apt-get install linux-headers-4.9.0-11-all -y | |
sudo reboot | |
# DIA GPU | |
apt-get update | |
apt-get install -y pciutils: | |
if ! (lspci | grep -q NVIDIA); then | |
echo 'No NVIDIA card detected. Skipping installation.' >&2 | |
exit 0 | |
fi | |
# Add non-free Debian 9 Stretch packages. | |
# See https://www.debian.org/distrib/packages#note | |
for type in deb deb-src; do | |
for distro in stretch stretch-backports; do | |
for component in contrib non-free; do | |
echo "${type} http://deb.debian.org/debian/ ${distro} ${component}" \ | |
>> /etc/apt/sources.list.d/non-free.list | |
done | |
done | |
done | |
apt-get update | |
# Install proprietary NVIDIA Drivers and CUDA | |
# See https://wiki.debian.org/NvidiaGraphicsDrivers | |
export DEBIAN_FRONTEND=noninteractive | |
# apt-get install -y "linux-headers-$(uname -r)" | |
# Without --no-install-recommends this takes a very long time. | |
apt-get install -y -t stretch-backports --no-install-recommends \ | |
nvidia-cuda-toolkit nvidia-kernel-common nvidia-driver nvidia-smi | |
# reate a system wide NVBLAS config | |
# See http://docs.nvidia.com/cuda/nvblas/ | |
NVBLAS_CONFIG_FILE=/etc/nvidia/nvblas.conf | |
cat << EOF >> ${NVBLAS_CONFIG_FILE} | |
# Insert here the CPU BLAS fallback library of your choice. | |
# The standard libblas.so.3 defaults to OpenBLAS, which does not have the | |
# requisite CBLAS API. | |
NVBLAS_CPU_BLAS_LIB /usr/lib/libblas/libblas.so | |
# Use all GPUs | |
NVBLAS_GPU_LIST ALL | |
# Add more configuration here. | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment