centos 7オフラインインストールnvidia駆動およびcuda,cudnn
3258 ワード
まず適切なバージョンのgpuドライバとcuda,cudnnをダウンロードします
ダウンロードアドレス CUDA:https://developer.nvidia.com/cuda-downloads cuDNn(Nvidiaアカウントの登録が必要):https://developer.nvidia.com/cudn gpu駆動:https://www.nvidia.cn/Download/index.aspx?lang=cn
バージョン間の対応関係に注意、今回はcuda 9、cudnn 7、グラフィックスk 80を使用します
gpuドライバのインストール
グラフィックインタフェースをオフにする
ドライバインストール(cudaと併せてインストールすることもできます)
kernel-source-pathはシステム対応カーネルバージョンです
あとはそのまま見て選べばいい
インストールcuda
cudnnのインストール
ダウンロードアドレス
バージョン間の対応関係に注意、今回はcuda 9、cudnn 7、グラフィックスk 80を使用します
gpuドライバのインストール
グラフィックインタフェースをオフにする
init 3
ドライバインストール(cudaと併せてインストールすることもできます)
kernel-source-pathはシステム対応カーネルバージョンです
./NVIDIA-Linux-x86_64-384.183.run --kernel-source-path=/usr/src/kernels/3.10.0-693.5.2.el7.x86_64
あとはそのまま見て選べばいい
インストールcuda
./cuda_9.0.176_384.81_linux.run
Do you accept the previously read EULA?
accept/decline/quit: accept
Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 384.81?
(y)es/(n)o/(q)uit: yes # gpu ,
Do you want to install the OpenGL libraries?
(y)es/(n)o/(q)uit [ default is yes ]: no # no
Do you want to run nvidia-xconfig?
This will update the system X configuration file so that the NVIDIA X driver
is used. The pre-existing X configuration file will be backed up.
This option should not be used on systems that require a custom
X configuration, such as systems with multiple GPU vendors.
(y)es/(n)o/(q)uit [ default is no ]: no
Install the CUDA 9.0 Toolkit?
(y)es/(n)o/(q)uit: yes
Enter Toolkit Location
[ default is /usr/local/cuda-9.0 ]:
Do you want to install a symbolic link at /usr/local/cuda?
(y)es/(n)o/(q)uit: yes
Install the CUDA 9.0 Samples?
(y)es/(n)o/(q)uit: yes
Enter CUDA Samples Location
[ default is /root ]:
Installing the NVIDIA display driver...
Installing the CUDA Toolkit in /usr/local/cuda-9.0 ...
Missing recommended library: libGLU.so
Missing recommended library: libX11.so
Missing recommended library: libXi.so
Missing recommended library: libXmu.so
Missing recommended library: libGL.so
Installing the CUDA Samples in /root ...
Copying samples to /root/NVIDIA_CUDA-9.0_Samples now...
Finished copying samples.
===========
= Summary =
===========
Driver: Installed
Toolkit: Installed in /usr/local/cuda-9.0
Samples: Installed in /root, but missing recommended libraries
Please make sure that
- PATH includes /usr/local/cuda-9.0/bin
- LD_LIBRARY_PATH includes /usr/local/cuda-9.0/lib64, or, add /usr/local/cuda-9.0/lib64 to /etc/ld.so.conf and run ldconfig as root
To uninstall the CUDA Toolkit, run the uninstall script in /usr/local/cuda-9.0/bin
To uninstall the NVIDIA Driver, run nvidia-uninstall
Please see CUDA_Installation_Guide_Linux.pdf in /usr/local/cuda-9.0/doc/pdf for detailed information on setting up CUDA.
Logfile is /tmp/cuda_install_34964.log
Signal caught, cleaning up
vim /etc/profile
( cuda )
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
source /etc/profile
cudnnのインストール
tar xvf cudnn-9.0-linux-x64-v7.3.1.20.solitairetheme8 -C /home/manager
manager
cd ~
vim .bashrc
export LD_LIBRARY_PATH=/home/manager/cuda/lib64:$LD_LIBRARY_PATH
source .bashrc
cd cuda/include/
cp *.h /usr/local/cuda/include/
chmod 777 cudnn.h