cd Tasks
cd Task1
sudo ./cuda_9.0.176_384.81_linux.run
accept
n
y
y
y
cat /usr/local/cuda/version.txt >> nvidia.txt
cudnn
tar xvzf cudnn-9.0-linux-x64-v7.tgz
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo cp cuda/include/cudnn.h /usr/local/cuda/include
sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64b/libcudnn*
sudo rm -rf libcudnn.so libcudnn.so.7
sudo chmod u=rwx,g=rx,o=rx libcudnn.so.7.0.5
sudo ln -s libcudnn.so.7.0.5 libcudnn.so.7
sudo ln -s libcudnn.so.7 libcudnn.so
sudo ldconfig
cd Tasks
cd Task1
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR >> cudnn.txt
nano /home/xxx/.bashrc
export PATH=/usr/local/cuda-9.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64:$LD_LIBRARY_PATH
echo /home/xxx/.bashrc
cat ~/.bashrc >> bashrc.txtecho $PATH >> bashrc.txtecho $LD_LIBRARY_PATH >> bashrc.txt
执行:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple numpy==1.16.1
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pandas==0.23.4
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pygame
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple keras==2.2.4
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple nltk==3.3
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple matplotlib==3.0.2
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple h5py==2.9.0
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple six==1.12.0
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-python==4.0.0.21
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow-gpu==1.12.0 jupyter-tensorboard==0.1.9
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple scipy==1.2.1
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple Tensorboard==1.12.2
python
import tensorflow as tf
tf.__version__