Tensorflow 需求
在 Ubuntu 跑 Tensorflow ,尤其是支援 gpu 版本,要符合這幾個需求:- cuDNN 6.0
- CUDA 8.0
- Nvidia Driver
安裝詳情請參考 Tensorflow: https://www.tensorflow.org/install/install_linux
安裝後,需要優先設置 export 路徑,放在 .bashrc 裡面也可以:
export PATH="/home/vk/anaconda3/bin:$PATH"
export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export CUDA_HOME=/usr/local/cuda-9.0
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64/
Nvidia-Docker-Plugin 找不到
如果 Nvidia-docker 出現 nvidia-docker-plugin 錯誤,解決方案: https://github.com/NVIDIA/nvidia-docker/issues/255- 移除 nvidia-docker: rm -rf /var/lib/nvidia-docker
- 重新安裝 nvidia-docker (https://github.com/NVIDIA/nvidia-docker/wiki)
- 重新開機
Tensorflow 無法引用 audio_ops
若出現 from tensorflow.contrib.framework.python.ops import audio_ops as contrib_audio 錯誤,表示你的 tensorflow 是新的版本,需要另外多安裝一個 tf-nightly:pip install tf-nightly
Anaconda 環境下的 Lib 庫需求
- pip 安裝 tensorflow / tensorflow-gpu
- conda 也要安裝 tensorflow / tensorflow-gpu
- 找不到 conda 指令,請先 export:
export PATH="/home/vk/anaconda3/bin:$PATH"
Reference:
https://github.com/tensorflow/tensorflow/issues/13031
https://github.com/NVIDIA/nvidia-docker/wiki
https://github.com/NVIDIA/nvidia-docker/issues/255
https://blog.gtwang.org/programming/tensorboard-tensorflow-visualization-tutorial/
http://playground.tensorflow.org/#activation=tanh&batchSize=11&dataset=gauss®Dataset=reg-plane&learningRate=0.03®ularizationRate=0&noise=5&networkShape=2,2&seed=0.44761&showTestData=false&discretize=false&percTrainData=90&x=true&y=false&xTimesY=false&xSquared=false&ySquared=false&cosX=false&sinX=false&cosY=false&sinY=false&collectStats=false&problem=classification&initZero=false&hideText=false
https://www.tensorflow.org/install/install_linux
沒有留言:
張貼留言