Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#########
# Steps to enable CUDA (NVIDIA GPU) on a Centos7 box
# (This is not a script, just some notes)
#########
# setup chroot sftp user for workers to be able to drop files:
# http://www.thegeekstuff.com/2012/03/chroot-sftp-setup/
#########
# CUDA
#########
# disable selinux
sed -i 's/enforcing/disabled/g' /etc/selinux/config /etc/selinux/config
# then reboot
#shutdown -r now
# disable postfix
systemctl stop postfix
systemctl disable postfix
# enable swap
/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
/sbin/mkswap /var/swap.1
/sbin/swapon /var/swap.1
# library dependencies
yum -y install lapack-devel
yum install gcc-c++
yum install kernel-devel
yum -y install libjpeg-turbo-devel zlib-devel
# get epel
cd /var/tmp
curl -O https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum -y install ./epel-release-latest-7.noarch.rpm
# update all
yum -y update
# install other utils
yum -y install pciutils
# get cuda RPM of rpms for centos 7
# (must be done on GPU enabled host)
cd /var/tmp
curl -O http://developer.download.nvidia.com/compute/cuda/7.5/Prod/local_installers/cuda-repo-rhel7-7-5-local-7.5-18.x86_64.rpm
yum -y install ./cuda-repo-rhel7-7-5-local-7.5-18.x86_64.rpm
yum -y install cuda
cd /usr/local/cuda-7.5/samples/1_Utilities/deviceQuery
make
cp -p deviceQuery /root
# get tools
yum -y install git
# install python-virtualenv
yum -y install python-virtualenv
# create venv
cd /root
virtualenv deepenv
# activate deepenv (within script?)
# install pip pkgs
pip install numpy
pip install Cython
pip install scipy
# install cudarray (cuda enabled numpy)
cd /root
git clone https://github.com/andersbll/cudarray
cd cudarray
make
make install
python setup.py install
yum -y install libjpeg-turbo-devel
cd /root
git clone https://github.com/andersbll/deeppy
cd deeppy
python setup.py install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.