Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
23 additions
and
10 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
#!/usr/bin/env bash | ||
set -ex | ||
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/${CUDA_PKG} | ||
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/7fa2af80.pub | ||
sudo dpkg -i ${CUDA_PKG} | ||
rm ${CUDA_PKG} | ||
sudo apt-get -y update | ||
sudo apt-get install -y --no-install-recommends cuda-core-${CUDA_VERSION} cuda-cudart-dev-${CUDA_VERSION} cuda-cublas-dev-${CUDA_VERSION} cuda-curand-dev-${CUDA_VERSION} | ||
sudo ln -sf /usr/local/cuda-${CUDA_VERSION} /usr/local/cuda | ||
|
||
if [ "$(ls -A $CUDA_LIB_LOCAL)" ]; then | ||
echo "Fetched cuda deps from cache" | ||
else | ||
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/${CUDA_PKG} | ||
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/7fa2af80.pub | ||
sudo dpkg -i ${CUDA_PKG} | ||
rm ${CUDA_PKG} | ||
sudo apt-get -y update | ||
sudo apt-get install -y --no-install-recommends cuda-core-${CUDA_VERSION} cuda-cudart-dev-${CUDA_VERSION} cuda-cublas-dev-${CUDA_VERSION} cuda-curand-dev-${CUDA_VERSION} | ||
mkdir -p ${CUDA_LIB_LOCAL} | ||
sudo cp -rL /usr/local/cuda-${CUDA_VERSION}/bin /usr/local/cuda-${CUDA_VERSION}/lib64 /usr/local/cuda-${CUDA_VERSION}/include /usr/local/cuda-${CUDA_VERSION}/nvvm ${CUDA_LIB_LOCAL} | ||
fi |