Last active
April 30, 2017 21:17
-
-
Save chrisvoncsefalvay/6a9e313c0380eb4475ea1a137b39ec62 to your computer and use it in GitHub Desktop.
CentOS dev env
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
sudo yum -y install yum-utils | |
sudo yum -y groupinstall development | |
sudo yum install -y zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel expat-devel | |
sudo yum install -y wget | |
# Python 3 IUS | |
sudo yum -y install https://centos7.iuscommunity.org/ius-release.rpm | |
sudo yum -y install python36u | |
sudo yum -y install python36u-pip | |
sudo yum -y install python36u-devel | |
# Python virtual enving | |
mkdir ~/environments && cd $_ | |
python3.6 -m venv research | |
source ~/environments/research/bin/activate | |
# CUDA and CuDNN | |
lspci -nnk | grep -i nvidia # Confirm we've got the iron ;) | |
export CUDA_HOME=/usr/local/cuda | |
export NVIDIA_HOME=/usr/local/nvidia | |
export PATH=${CUDA_HOME}/bin:${PATH} | |
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH} | |
NVIDIA_GPGKEY_SUM=bd841d59a27a406e513db7d405550894188a4c1cd96bf8aa4f82f1b39e0b5c1c | |
curl -fsSL http://developer.download.nvidia.com/compute/cuda/repos/GPGKEY \ | |
| sed '/^Version/d' > /etc/pki/rpm-gpg/RPM-GPG-KEY-NVIDIA | |
echo "$NVIDIA_GPGKEY_SUM /etc/pki/rpm-gpg/RPM-GPG-KEY-NVIDIA" | sha256sum -c --strict - | |
cp cuda.repo /etc/yum.repos.d/cuda.repo | |
CUDA_VERSION=7.0 | |
CUDA_PKG_VERSION=7-0-7.0-28 | |
sudo yum install -y \ | |
cuda-nvrtc-$CUDA_PKG_VERSION \ | |
cuda-cusolver-$CUDA_PKG_VERSION \ | |
cuda-cublas-$CUDA_PKG_VERSION \ | |
cuda-cufft-$CUDA_PKG_VERSION \ | |
cuda-curand-$CUDA_PKG_VERSION \ | |
cuda-cusparse-$CUDA_PKG_VERSION \ | |
cuda-npp-$CUDA_PKG_VERSION \ | |
cuda-cudart-$CUDA_PKG_VERSION | |
ln -s cuda-$CUDA_VERSION /usr/local/cuda | |
echo "/usr/local/cuda/lib" >> /etc/ld.so.conf.d/cuda.conf | |
echo "/usr/local/cuda/lib64" >> /etc/ld.so.conf.d/cuda.conf | |
ldconfig | |
### devel | |
sudo yum install -y \ | |
cuda-core-$CUDA_PKG_VERSION \ | |
cuda-misc-headers-$CUDA_PKG_VERSION \ | |
cuda-command-line-tools-$CUDA_PKG_VERSION \ | |
cuda-license-$CUDA_PKG_VERSION \ | |
cuda-cublas-dev-$CUDA_PKG_VERSION \ | |
cuda-cufft-dev-$CUDA_PKG_VERSION \ | |
cuda-curand-dev-$CUDA_PKG_VERSION \ | |
cuda-cusparse-dev-$CUDA_PKG_VERSION \ | |
cuda-npp-dev-$CUDA_PKG_VERSION \ | |
cuda-cudart-dev-$CUDA_PKG_VERSION \ | |
cuda-driver-dev-$CUDA_PKG_VERSION | |
### cuDNN | |
CUDNN_VERSION=2 | |
CUDNN_DOWNLOAD_SUM=4b02cb6bf9dfa57f63bfff33e532f53e2c5a12f9f1a1b46e980e626a55f380aa | |
curl -fsSL http://developer.download.nvidia.com/compute/redist/cudnn/v2/cudnn-6.5-linux-x64-v2.tgz -O | |
echo "$CUDNN_DOWNLOAD_SUM cudnn-6.5-linux-x64-v2.tgz" | sha256sum -c --strict - | |
tar -xzf cudnn-6.5-linux-x64-v2.tgz | |
cp -a cudnn-6.5-linux-x64-v2/cudnn.h /usr/local/cuda/include/ | |
cp -a cudnn-6.5-linux-x64-v2/libcudnn* /usr/local/cuda/lib64/ | |
rm -rf cudnn-6.5-linux-x64-v2* | |
ldconfig | |
# Install Tensorflow and other stuff | |
sudo yum -y install epel-release | |
sudo yum -y install gcc gcc-c++ python-pip python-devel atlas atlas-devel gcc-gfortran openssl-devel libffi-devel | |
pip3.6 install --upgrade virtualenv | |
pip3.6 install --upgrade numpy scipy wheel sklearn pandas tensorflow matplotlib keras hyperas | |
pip3.6 install --upgrade jupyter |
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
export CUDA_HOME=/usr/local/cuda | |
export NVIDIA_HOME=/usr/local/nvidia | |
export PATH=${CUDA_HOME}/bin:${PATH} | |
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH} |
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
[cuda] | |
name=cuda | |
baseurl=http://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64 | |
enabled=1 | |
gpgcheck=1 | |
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-NVIDIA |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment