Provide some script for cuda-cudnn set up. Forked from this.
We provide scripts to generate cuda-cudnn script. Somehow, you need to download Code Samples and User Guide from nvidia's download site and put it in this folder, registration needed.
- Generate Scripts with assigned version
python3 gen_sh.py --cuda 9.0 --cudnn 7.4 --ubuntu 1604
- Install CUDA
sudo chmod +x gpu-setup-part1-cuda.sh
./gpu-setup-part1-cuda.sh
It will reboot the machine once process completed. Have a drink, this may take 20~30 min, upto download time
- Install CUDNN
sudo chmod +x gpu-setup-part2-cudnn.sh
./gpu-setup-part2-cudnn.sh
This may take ~5 min
- Have a tensorflow test
python3 gpu-test.py
-
We use cuda 9.0 and cudnn 7.4 as basic example here. For the further combination, information can be find cudnn version, cuda version. Or there ubuntu1804 version.
-
We currently only support the following cudnn-cuda pair:
CUDNN | CUDA |
---|---|
7.0 | 9.0 |
7.2 | 9.0 |
7.2 | 9.2 |
7.4 | 9.0 |
7.4 | 9.2 |
7.4 | 10.0 |
7.4 | 10.1 |
7.5 | 9.0 |
7.5 | 9.2 |
7.5 | 10.0 |
7.5 | 10.1 |
Once multiple cuda was installed, we may use the following code in bashrc/zshrc to control CUDA version.
export CUDA_HOME=/usr/local/cuda-9.0
export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$CUDA_HOME/extras/CUPTI/lib64
export PATH=$PATH:$CUDA_HOME/bin
tensorflow 2.0 requires specific version of cuda/cudnn/nvidia-driver
Check this.