<commit_before>#!/bin/bash

###################################################################
### Copyright (C) 2016 ClassCat(R) Co.,Ltd. All righs Reserved. ###
###################################################################

# --- HISTORY -----------------------------------------------------
# 29-feb-16 : created.
# -----------------------------------------------------------------

cd /mnt

mkdir -p nvidia


###
### CUDA 7.5
###

cd /mnt/nvidia

wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_7.0-28_amd64.deb

dpkg -i cuda-repo-ubuntu1404_7.0-28_amd64.deb

apt-get update

apt-get install -y cuda-7-5


###
### cuDNN v4
###

cd /mnt/nvidia

s3cmd get s3://classcat-com/nvidia/cudnn-7.0-linux-x64-v4.0-prod.tgz

tar xfz ./cudnn-7.0-linux-x64-v4.0-prod.tgz 

mkdir /usr/local/cudnn-r4

cp -r cuda /usr/local/cudnn-r4


###

echo "export CUDA_HOME=/usr/local/cuda" >> /root/.bashrc
echo "export PATH=$PATH:\$CUDA_HOME/bin" >> /root/.bashrc
echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$CUDA_HOME/lib64:/usr/local/cudnn-r4/cuda/lib64" >> /root/.bashrc

echo "export CUDA_HOME=/usr/local/cuda" >> /home/tensorflow/.bashrc
echo "export PATH=$PATH:\$CUDA_HOME/bin" >> /home/tensorflow/.bashrc
echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$CUDA_HOME/lib64:/usr/local/cudnn-r4/cuda/lib64" >> /home/tensorflow/.bashrc

echo "export CUDA_HOME=/usr/local/cuda" >> /home/tensorflow070/.bashrc
echo "export PATH=$PATH:\$CUDA_HOME/bin" >> /home/tensorflow070/.bashrc
echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$CUDA_HOME/lib64:/usr/local/cudnn-r4/cuda/lib64" >> /home/tensorflow070/.bashrc

##

source ~/.bashrc

cp -a /usr/local/cuda/samples ./cuda.samples

cd cuda.samples/1_Utilities/deviceQuery

make

./deviceQuery

make clean

cd ~

##

echo ""
echo "CUDA 7.5 & cnDNN v4 installed, please reboot the instance."
echo ""


exit 0
<commit_msg>install cuda and cudnn<commit_after>1#!/bin/bash

###################################################################
### Copyright (C) 2016 ClassCat(R) Co.,Ltd. All righs Reserved. ###
###################################################################

# --- HISTORY -----------------------------------------------------
# 29-feb-16 : created.
# -----------------------------------------------------------------

cd /mnt

mkdir -p nvidia


###
### CUDA 7.5
###

cd /mnt/nvidia

wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_7.0-28_amd64.deb

dpkg -i cuda-repo-ubuntu1404_7.0-28_amd64.deb

apt-get update

apt-get install -y cuda-7-5


###
### cuDNN v4
###

cd /mnt/nvidia

s3cmd get s3://classcat-com/nvidia/cudnn-7.0-linux-x64-v4.0-prod.tgz

tar xfz ./cudnn-7.0-linux-x64-v4.0-prod.tgz 

mkdir /usr/local/cudnn-r4

cp -r cuda /usr/local/cudnn-r4


###

echo "export CUDA_HOME=/usr/local/cuda" >> /root/.bashrc
echo "export PATH=$PATH:\$CUDA_HOME/bin" >> /root/.bashrc
echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$CUDA_HOME/lib64:/usr/local/cudnn-r4/cuda/lib64" >> /root/.bashrc

echo "export CUDA_HOME=/usr/local/cuda" >> /home/tensorflow/.bashrc
echo "export PATH=$PATH:\$CUDA_HOME/bin" >> /home/tensorflow/.bashrc
echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$CUDA_HOME/lib64:/usr/local/cudnn-r4/cuda/lib64" >> /home/tensorflow/.bashrc

echo "export CUDA_HOME=/usr/local/cuda" >> /home/tensorflow070/.bashrc
echo "export PATH=$PATH:\$CUDA_HOME/bin" >> /home/tensorflow070/.bashrc
echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$CUDA_HOME/lib64:/usr/local/cudnn-r4/cuda/lib64" >> /home/tensorflow070/.bashrc

##

source ~/.bashrc

cp -a /usr/local/cuda/samples ./cuda.samples

cd cuda.samples/1_Utilities/deviceQuery

make

./deviceQuery

make clean

cd /mnt

##

echo ""
echo "CUDA 7.5 & cnDNN v4 has been installed, please reboot the instance."
echo ""


exit 0

{'fraction_non_alphanumeric': 0.28348097967691505, 'fraction_numerical': 0.04507556018759771, 'mean_word_length': 3.079702444208289, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2994406', 'n_tokens_mistral': 1658, 'n_tokens_neox': 1457, 'n_words': 228}