0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Anaconda環境の再構築 PlanB (TensorFlow1.13.1用)

0
Last updated at Posted at 2020-04-27
Page 1 of 2

現状把握

すでに入っている環境を確認

dpkg -l|grep nvidia
dpkg -l|grep cuda

取り除く

sudo apt-get --purge remove nvidia-*
sudo apt-get --purge remove cuda-*
sudo apt autoremove

リポジトリの登録

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update 

そしてCUDA 10.0をDL(パッチも)
https://developer.nvidia.com/cuda-10.0-download-archive?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1804&target_type=runfilelocal

再起動してインストール

sudo sh cuda_10.0.130_410.48_linux.run

ここでインストール失敗

Driverのインストールを推奨されたので素直に従う。

===========
= Summary =
===========

Driver:   Installation Failed
Toolkit:  Installation skipped
Samples:  Installation skipped

/tmp にあるログを確認すると、どうやらカーネルにDriverがはいってエラーになっている模様。
下記サイト
https://qiita.com/Orihasam810/items/020d439d0aec2d90cd73
を参考にドライバ以外をインストールし、usr/local/cuda10.0の構築を目指す

そして成功。

===========
= Summary =
===========

Driver:   Not Selected
Toolkit:  Installed in /usr/local/cuda-10.0
Samples:  Installed in /home/lcj001, but missing recommended libraries
↑ちょっと惜しい?

その後も参考サイトに従い設定は無事終了。(いろいろ参考になりました)

Anaconda Navigatorのインストール

サイトよりファイルをDL
Anaconda3-2020.02-Linux-x86_64.sh

bash Anaconda3-2020.02-Linux-x86_64.sh

pythonのダウングレード 3.7->3.6.6 (2020/4/27現在)

conda install python=3.6.6

Tensorflow 2.0のインストール->1.13.13へダウングレード

GUIからKerasをインストール(tesforflowからはインストール失敗)

sudo apt install python3-pip
pip3 install --upgrade tensorflow-gpu==1.13.1
pip3 install --upgrade tensorflow==.13.1
インストール後
pip list
---------
tensorflow-gpu 1.13.1 <-はいった。けどGUIだと2.0のまま

課題
結局「混ぜるな危険」になってる、、
ただnvidia-smiで未だ10.1だったり、ちゃんとテストが通るか検証する

影響がでた点

numpyのダウングレード 1.18.3->1.14.15

pip uninstall numpy でOK

最終決着

上の手順でも☓。で、Anacondaのブラウザで2.0->1.13.1ダウングレードしたらできました。
とりあえず環境は整ったのだが、インポートエラーは治らず、、、

環境

- python 3.6
- nvidia driver 435
- TensorFlow 1.13 (まだ)
- Cuda 10.0
- cuDNN 7.5.10-1

参考にさせていただいたサイト

【機械学習】Tensorflow・CUDA・cuDNN環境づくりの手引き
http://dslab.work/2019/09/19/post-224/

Ubuntu18.04にNVIDIAとCUDAを入れ直すことに
https://qiita.com/Yoshitaka_Youtuber/items/bd8edcb36396df878641

【Ubuntu18.04】Tensorflow2.0.0-GPU環境構築
https://qiita.com/Orihasam810/items/020d439d0aec2d90cd73

【対処法】Python3.7ではTensorFlowを利用できない..?
https://pycarnival.com/tensorflow_python37/

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?