Skip to content

Instantly share code, notes, and snippets.

@nwh
Last active April 13, 2019 11:14
Show Gist options
  • Select an option

  • Save nwh/f67b6e0602f3f94a581270fa9ae41750 to your computer and use it in GitHub Desktop.

Select an option

Save nwh/f67b6e0602f3f94a581270fa9ae41750 to your computer and use it in GitHub Desktop.
Dell XPS 15 9560 Configuration for CUDA Development
# 2017-04-06
#
# The sequence of commands below can be used to configure a Dell XPS 15 9560 laptop
# for CUDA development and testing. No special care is taken for battery life. In
# the end, the Nvidia GPU is used to drive the display and may run CUDA executables.
#
# update ubuntu
sudo apt update
sudo apt upgrade
# install build tools and dkms
sudo apt install build-essential dkms
# create download folder
mkdir -p ~/cuda-dl
# download and update linux kernel
mkdir -p ~/cuda-dl/kernel
cd ~/cuda-dl/kernel
wget \
kernel.ubuntu.com/~kernel-ppa/mainline/v4.9.20/linux-headers-4.9.20-040920_4.9.20-040920.201703310531_all.deb \
kernel.ubuntu.com/~kernel-ppa/mainline/v4.9.20/linux-headers-4.9.20-040920-generic_4.9.20-040920.201703310531_amd64.deb \
kernel.ubuntu.com/~kernel-ppa/mainline/v4.9.20/linux-image-4.9.20-040920-generic_4.9.20-040920.201703310531_amd64.deb
sudo dpkg -i linux-headers-4.9*.deb linux-image-4.9*.deb
# REBOOT NOW
# download and install intel graphics firmware
mkdir -p ~/cuda-dl/intel
cd ~/cuda-dl/intel
wget https://01.org/sites/default/files/downloads/intelr-graphics-linux/kbldmcver101.tar.bz2
tar xjvf kbldmcver101.tar.bz2
cd kbl_dmc_ver1_01/
sudo ./install.sh
cd ~/cuda-dl/intel
wget https://01.org/sites/default/files/downloads/intelr-graphics-linux/kblgucver914.tar.gz;
tar xvzf kblgucver914.tar.gz
cd firmware/kbl/guc/kbl_guc_ver9_14/
chmod +x ./install.sh
sudo ./install.sh
# Install nvidia-drivers via ubuntu drivers
sudo ubuntu-drivers autoinstall
# Install CUDA 8
# This acts as repo so install it somewhere safe and do not delete
mkdir -p ~/cuda-dl/cuda
cd ~/cuda-dl/cuda
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1604_8.0.61-1_amd64.deb
sudo apt update
sudo apt upgrade
sudo apt install cuda
# to access cuda binaries and libraries in your environment:
# create /etc/profile.d/cuda.sh and /etc/ld.so.conf.d/cuda.conf (see below)
# file: /etc/ld.so.conf.d/cuda.conf
/usr/local/cuda/lib64
# file: /etc/profile.d/cuda.sh
export PATH=/usr/local/cuda/bin:${PATH}
@nwh

nwh commented Apr 6, 2017

Copy link
Copy Markdown
Author

@edlgg

edlgg commented Jun 14, 2017

Copy link
Copy Markdown

Hello, can you more clearly explain the last part of the guide?

to access cuda binaries and libraries in your environment:
create /etc/profile.d/cuda.sh and /etc/ld.so.conf.d/cuda.conf (see below)

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment