Ubuntu 18.04.4 版安裝完成了,
接下來,
安裝 Python
$ sudo apt install python
$ sudo apt install python3
https://mc.ai/easily-install-tensorflow-gpu-2-0-on-linux-ubuntu-18-04-cuda-10-cudnn-7-6-5/
$ sudo apt install python3-pip
接下來,
安裝 Tensorflow 2.0 的相關套件,這個相當繁瑣,不大容易,姑且試一試吧:
首先要安裝相依套件:
Install Python and the TensorFlow package dependencies
https://www.tensorflow.org/install/source
$ sudo apt install python-dev python-pip # or python3-dev python3-pip
$ pip install -U --user pip six numpy wheel setuptools mock 'future>=0.17.1'
$ pip install -U --user keras_applications --no-deps
$ pip install -U --user keras_preprocessing --no-deps
接下來,
安裝 Bazel 2.2.0 ( Install Bazel )
有二個方法:
https://docs.bazel.build/versions/master/install-ubuntu.html
第一個方法過程中有出現錯誤,
改用第二個方法
要下載這個檔
https://github.com/bazelbuild/bazel/releases
bazel-2.2.0-installer-linux-x86_64.sh
chmod +x bazel--installer-linux-x86_64.sh
./bazel--installer-linux-x86_64.sh --user
要將下行加入
~/.bashrc
or ~/.zshrc
設定檔之內export PATH="$PATH:$HOME/bin"
第二個方法看似沒有出現錯誤。
大概 Bazel 是安裝好了!
接下來,
安裝 GCC ( 7.5.0 )
https://linuxize.com/post/how-to-install-gcc-compiler-on-ubuntu-18-04/
sudo apt update
sudo apt install build-essential
sudo apt-get install manpages-dev
gcc --version
這個相對比較容易。
大概 Bazel 是安裝好了!
接下來,
安裝 NVIDIA driver 版本
https://medium.com/@maniac.tw/ubuntu-18-04-%E5%AE%89%E8%A3%9D-nvidia-driver-418-cuda-10-tensorflow-1-13-a4f1c71dd8e5
ubuntu-drivers devices
sudo ubuntu-drivers autoinstall
安裝完成以後重新開機
重新開機以後測試一下
nvidia-smi
如果可以正常顯示,應該是沒問題了。
接下來,
安裝 NVIDIA CUDA 10.2
https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1804&target_type=deblocal
依照官網的步驟:
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pinsudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600wget http://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda-repo-ubuntu1804-10-2-local-10.2.89-440.33.01_1.0-1_amd64.debsudo dpkg -i cuda-repo-ubuntu1804-10-2-local-10.2.89-440.33.01_1.0-1_amd64.debsudo apt-key add /var/cuda-repo-10-2-local-10.2.89-440.33.01/7fa2af80.pubsudo apt-get updatesudo apt-get -y install cuda
接下來,
安裝 NVIDIA cuDNN 7.6.5
https://developer.nvidia.com/rdp/cudnn-download
這個下載需要有 NVIDIA 官網的帳號與密碼,
接下來,
安裝 Anaconda
https://www.digitalocean.com/community/tutorials/how-to-install-anaconda-on-ubuntu-18-04-quickstart
https://www.anaconda.com/distribution/
How To Set Up Jupyter Notebook with Python 3 on Ubuntu 18.04
https://www.digitalocean.com/community/tutorials/how-to-set-up-jupyter-notebook-with-python-3-on-ubuntu-18-04
Why does “(base)” appear in front of my terminal prompt?
https://askubuntu.com/questions/1026383/why-does-base-appear-in-front-of-my-terminal-prompt
Easily Install Tensorflow-GPU 2.0 on Linux Ubuntu 18.04 -Cuda 10& Cudnn 7.6.5
https://mc.ai/easily-install-tensorflow-gpu-2-0-on-linux-ubuntu-18-04-cuda-10-cudnn-7-6-5/
2020-04-02
2020-04-06
沒有留言:
張貼留言