#!/bin/bash
CONF=/etc/modprobe.d/blacklist-nouveau.conf
touch $CONF
echo "blacklist nouveau" >> $CONF
echo "options nouveau modeset=0" >> $CONF
update-initramfs -u
reboot
From askubuntu.com
cuda
include the nvidia driver, so you do not need to install driver separately.
wget 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
Add envs to ~/.bashrc
export PATH=$PATH:/usr/local/cuda/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64
Download cudnn-9.0-linux-x64-v7.4.1.5.tgz
at developer.nvidia.com
And perform following commnds
tar xfz cudnn-9.0-linux-x64-v7.4.1.5.tgz
cp -P cuda/include/* /usr/local/cuda/include/
cp -P cuda/lib64/* /usr/local/cuda/lib64/
Do not install tensorflow-gpu
, it is not compatible with tf_cnn_benchmarks.py
python3 -m pip install tf-nightly-gpu==1.12.0.dev20181012
Download scripts
wget https://github.com/tensorflow/benchmarks/archive/cnn_tf_v1.12_compatible.zip
unzip cnn_tf_v1.12_compatible.zip
Run scripts
#!/bin/bash
PY=/usr/bin/python3
SCRIPTS=/root/benchmarks-cnn_tf_v1.12_compatible/scripts/tf_cnn_benchmarks/tf_cnn_benchmarks.py
${PY} ${SCRIPTS} --num_gpus=1 --num_batches=1000 --batch_size=32 --model=resnet50 \
--variable_update=parameter_server --local_parameter_device=cpu
refer to tensorflow github
cuda_9.0.176_win10_network.exe
cuda_9.0.176.1_windows.exe
~ cuda_9.0.176.4_windows.exe
cudnn-9.0-windows10-x64-v7.4.2.24.zip
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0
python-3.6.5-amd64.exe
py -m pip install tf-nightly-gpu==1.12.0.dev20181010
benchmarks-cnn_tf_v1.12_compatible.zip
and remember where tf_cnn_benchmarks.py
is%PYTHON%
and %SCRIPTS%
variables in run.bat
Visual Studio Integration
in cuda installation progress.
Visual Studio Integration 9.0
in CUDA Components
2) Or install cuda_9.2 first, and then install cuda_9.0.