-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcuda.sh
More file actions
14 lines (14 loc) · 579 Bytes
/
cuda.sh
File metadata and controls
14 lines (14 loc) · 579 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash
# Ubuntu 16.04 LTS - CUDA 9
echo "Checking for CUDA and installing."
# Check for CUDA and try to install.
if ! dpkg-query -W cuda-9-0; then
# The 16.04 installer works with 16.10.
curl -O http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.0.176-1_amd64.deb
dpkg -i ./cuda-repo-ubuntu1604_9.0.176-1_amd64.deb
apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
apt-get update
apt-get install cuda-9-0 -y
fi
# Enable persistence mode
nvidia-smi -pm 1