NVIDIA DRIVER INSTALLATION
Firstly install Nvidia driver, open terminal and run following commands.
- sudo apt update
- sudo add-apt-repository ppa:graphics-drivers/ppa
- sudo apt update
- sudo apt upgrade
- sudo ubuntu-drivers devices
- sudo apt install nvidia-410
After installation reboot your PC. Then if you have a problem in login (loop in login);
Open terminal in login screen with CTRL + ALT + F1 and then query your graphics card
- sudo prime-select query
select intel graphics card, if nvidia is selected
- sudo prime-select intel
Turn back to login screen (CTRL + ALT + F7), now you must be able to login succesfully.
Open Terminal, activate and check driver;
- sudo prime-select intel
- nvidia-smi
If everthing is OK, you must an output similar to;
CUDA TOOLKIT INSTALLATION
Now we are ready for CUDA installation;
- download CUDA 10.0 for Linux-Ubuntu-16.04: https://developer.nvidia.com/cuda-10.0-download-archive
Run sudo sh cuda_10.0.130_410.48_linux.run (When it asks to install driver, answer NO, because we have already did it!) Answer YES for all other questions
- download cudnn-7.4.2 for CUDA 10.0 ( cuDNN Library for Linux )-> https://developer.nvidia.com/rdp/cudnn-archive
Then extract the downloaded cuDNN tar file and copy the lib files to /usr/local/cuda-10.0 default path with following commands
- tar -xf cudnn-10.0-linux-x64-v7.4.2.24.tgz
- sudo cp -R cuda/include/* /usr/local/cuda-10.0/include
- sudo cp -R cuda/lib64/* /usr/local/cuda-10.0/lib64
PYTHON AND TENSORFLOW-GPU INSTALLATION
We suggest using conda distribution (download Python 3.7): https://www.anaconda.com/distribution/#download-section
After installation, add anaconda path to environment: export PATH=~/anaconda3/bin:$PATH
Then run : conda in Terminal to check and run: conda activate in your terminal to activate anaconda python environment
Then run : conda in Terminal to check and run: conda activate in your terminal to activate anaconda python environment
To install tensorflow for GPU:
- pip install tensorflow-gpu==1.13.1 (This version is suitable for CUDA 10.0)
Hiç yorum yok:
Yorum Gönder