From 10dbf8b9003750cbf79927d51c8a3d60afa085c1 Mon Sep 17 00:00:00 2001 From: Amir Gur Date: Thu, 10 Mar 2016 13:19:24 -0800 Subject: [PATCH] #21 - made a function out of the process to Install of caffe from nvidia packages - it can be used as a backup when building fails. --- scripts/install-deeplearning-libraries.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/scripts/install-deeplearning-libraries.sh b/scripts/install-deeplearning-libraries.sh index f390749..c221d02 100644 --- a/scripts/install-deeplearning-libraries.sh +++ b/scripts/install-deeplearning-libraries.sh @@ -145,15 +145,17 @@ else fi fi -# Install Caffe from nvidia packages +# Install Caffe from nvidia packages as a backup if the above build does not work # https://github.com/NVIDIA/DIGITS/blob/master/docs/UbuntuInstall.md#repository-access -CUDA_REPO_PKG=cuda-repo-ubuntu1404_7.5-18_amd64.deb && - wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/$CUDA_REPO_PKG && - sudo dpkg -i $CUDA_REPO_PKG -ML_REPO_PKG=nvidia-machine-learning-repo_4.0-2_amd64.deb && - wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1404/x86_64/$ML_REPO_PKG && - sudo dpkg -i $ML_REPO_PKG -sudo apt-get install -y caffe-nv python-caffe-nv +install_caffe_nvidia_packaging() { + CUDA_REPO_PKG=cuda-repo-ubuntu1404_7.5-18_amd64.deb && + wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/$CUDA_REPO_PKG && + sudo dpkg -i $CUDA_REPO_PKG + ML_REPO_PKG=nvidia-machine-learning-repo_4.0-2_amd64.deb && + wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1404/x86_64/$ML_REPO_PKG && + sudo dpkg -i $ML_REPO_PKG + sudo apt-get install -y caffe-nv python-caffe-nv +} # Register the circus daemon with Upstart if [ ! -f "/etc/init/circus.conf" ]; then