ubuntu 17.10でcuda8.0, nvidia-284でGNUバージョンエラーと/usr/bin/ld: cannot find-lnvcuvidエラー
NVIDIA_CUDA-8.0_Samplesでsampleをmakeしようとすると2種類のエラー発生したのでその対策
1.GNUバージョンエラー対策
$ sudo apt-get install gcc-4.8
$ sudo apt-get install g++-4.8
$ sudo update-alternatives ?install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20
$ sudo update-alternatives ?install /usr/bin/g++ g++ /usr/bin/g++-4.8 20
- /usr/bin/ld: cannot find -lnvcuvidエラー対策
$ sudo cp /usr/lib/nvidia-384/libnvcuvid.so /usr/local/cuda-8.0/lib64
$ sudo cp /usr/lib/nvidia-384/libnvcuvid.so.1 /usr/local/cuda-8.0/lib64
これでsampleがmakeできる様になり動かせた。
いつの間にかxrdpがブルースクリーンとなり、connection problem giving upとなってし
まう様になったので、いろいろ調べて対策。
On an unknown day, xrdp failed with blue screen by connection problem giving up.
I eventually found a solution through the Internet.
/etc/X11/Xwrapper.config
'original
allowed_users=console
'modified
allowed_users=anybody
hint:
'https://anonscm.debian.org/cgit/pkg-remote/xrdp.git/tree/debian/README.Debian
ndivia-dockerまでインストールできたので次は、DIGITSを使って、object detectionを試してみる。
データ類の準備のあと、大体は雑誌等の通りにしたのだが、うまくいかず。
ダメなパターン
$ sudo nvidia-docker run ?name digits -d -p 5000:34448 -v /otherdrive/home/username/odetection:/otherdrive/home/username/odetection nvidia/digits
修正1
-p 5000:34448では、最近の版数のDIGITSでは動かない模様。
-p 5000:5000にしたところ、http://localhost:5000/でアクセスできた
修正2
-v でフォルダーを指定したが、どうも、別ドライブ(別パーティティション)だと、DIGITSの画面からアクセスできなかった。 それで、準備したデータを、driverやnvidia-dockerなどと同じドライブに移し替えたところ、動く様になった。
以下を実施
git clone https://github.com/NVIDIA/DIGITS
cd DIGITS
cd examples
cd object-detection
wget http://dl.caffe.berkeleyvision.org/bvlc_googlenet.caffemodel
sudo cp -pr DIGITS /home/username
cd /home/username/DIGITS
cd examples
cd object-detection
./prepare_kitti_data.py
cp -r kitti-data kitti-tiny-data
cd kitti-tiny-data
seq -f "train/images/%06g.png" 500 7500 | xargs -n1 -I {} rm {}
seq -f "train/labels/%06g.txt" 500 7500 | xargs -n1 -I {} rm {}
seq -f "val/images/%06g.png" 500 7500 | xargs -n1 -I {} rm {}
seq -f "val/labels/%06g.txt" 500 7500 | xargs -n1 -I {} rm {}
sudo mkdir /home/username/odetction
sudo cp -r object-detection /home/username/odetection
$ sudo nvidia-docker run --name digits -d -p 5000:5000 -v /home/username/odetection:/home/username/odetection nvidia/digits
2017/4/18 追記
雑誌(日経Linux 2017年3月号)に掲載されていたobject detectionの事例において、batch sizeとbatch accumulationの値の組み合わせによっては物体検出がうまくいかなかった。
成功: (1,1), (2,1) , (1,5)
NG : (2,5)
上記表記は、(batch size, batch accumulation)をさしている。