LoginSignup
2
0

More than 3 years have passed since last update.

[メモ] Ubuntu 18.04/RTX2080Ti でnvidia-driverを入れたりした

Posted at

注意

ただのメモなので,基本的には参考にしないでください

やったこと

ダウンロードとかが日本語になっているのが鬱陶しいので変えておく,

LANG=C xdg-user-dirs-gtk-update

~/.bashrcに以下を追加

case "$TERM" in
     linux)
          export LANG=C
          ;;
     *)
          export LANG=ja_JP.UTF-8
          ;;
esac

セキュアブートは切っておく.
https://medium.com/@avinchintha/how-to-install-nvidia-drivers-and-cuda-10-0-for-rtx-2080-ti-gpu-on-ubuntu-16-04-18-04-ce32e4edf1c0
を参考に進めていく.

コンパイラなどをインストール

sudo apt install build-essential

failing CC version checkしたのでCCの環境変数を変えつつ実行

CC=gcc-7.3.0 sudo ./NVIDIA-Linux-x86_64-430.14.run --no-x-check

Unable to determine the version of the kernel sources になった.
/lib/modules/$VERSION/build/includeには普通にカーネルのソースが入っているので謎.
/var/log/nvidia-installerを見ろ見たいなことも出てくるが結局よく分からず.

なのでautoinstall してみようとする

sudo add-apt-repository ppa:graphics-drivers
sudo ubuntu-drivers autoinstall

そうしたらなんか入った.謎.

ちなみにaptから入れるのは上手くいかなくて,ごちゃごちゃやってあとに,
NVIDIA-SMI couldn't find http://libnvidia-ml.so library in your system. Please make sure that the NVIDIA Display Driver is properly installed and present in your system.が出て失敗.ちなみにlibnvidia-ml.soにパスは通っていた.(ほかにもいろいろやっていて詰んだので,クリーンインストールした)

ドライバーを入れないとまともに動かないのに,なんで公式のinstructionがないんでしょうか…

動作確認

nvidia-smiは動くが,nvidia-settingsがなんかエラーを吐く
https://devtalk.nvidia.com/default/topic/1050619/linux/nvidia-settings-error/
によれば問題ないらしい.

CUDA

死ぬほど不親切に思えたドライバーのダウンロードに比べここからは,officialのガイドがあって楽.
https://developer.nvidia.com/cuda-downloads
で適切な選択肢を選べば適切なコマンドが出てくる

CuDNN

https://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html
cuDNNも落とす.こちらもガイドを読めばその通りにできた.

オチ

CUDA10.1がtensorflowに対応していなかったので,nvidia-dockerを使うことにしました.ほとんどの手間はドライバーを入れる手間だったのでよかったんですが.

2
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
2
0