Skip to content

Instantly share code, notes, and snippets.

@chexov
Last active March 23, 2018 14:53
Show Gist options
  • Save chexov/ab202dc14faa2545eac34c53ea1deed6 to your computer and use it in GitHub Desktop.
Save chexov/ab202dc14faa2545eac34c53ea1deed6 to your computer and use it in GitHub Desktop.
install cuda and nvidia drivers into ubuntu
#!/bin/sh
NVIDIA_GPGKEY_SUM=d1be581509378368edeec8c1eb2958702feedf3bc3d17011adbf24efacce4ab5 && \
NVIDIA_GPGKEY_FPR=ae09fe4bbd223a84b2ccfce3f60f4b3d7fa2af80 && \
apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub && \
apt-key adv --export --no-emit-version -a $NVIDIA_GPGKEY_FPR | tail -n +5 > cudasign.pub && \
echo "$NVIDIA_GPGKEY_SUM cudasign.pub" | sha256sum -c --strict - && rm cudasign.pub
echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/cuda.list
echo "deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64/ /" > /etc/apt/sources.list.d/nvidia-machine-learning.list
# no needed. its already in the ubuntu repo
# sudo add-apt-repository ppa:graphics-drivers
sudo apt-get update
sudo apt-get install libcudnn7-dev libcudnn6-dev cuda-8-0 cuda-9-0
sudo apt-get install libopencv-dev
sudo apt-get install nvidia-390
###
apt-get install virtualenv
apt-get install unzip
apt-get install libopencv-dev
apt-get install libopencv-core-dev
apt-get install libopencv-contrib-dev
apt-get install libopencv-apps-dev
apt-get install cmake
apt-get install htop
apt-get install ffmpeg
apt-get install parallel
apt-get install ocl-icd-opencl-dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment