LoginSignup
2
2

More than 5 years have passed since last update.

aws ec2,g2.2xlarge,ubuntu 14.04環境にcaffe整備。特にfully convolutional networks for semantic segmentationを動くようにする。

Last updated at Posted at 2016-04-11

基本的には既存ブログを踏襲しています。

pyenvとminicondaのインストール。conda上の機械学習環境ml_envまでは作成せず。必要ライブラリはcondaで適宜インストール。
参考:http://qiita.com/icoxfog417/items/950b8af9100b64c0d8f9

aws ec2, ubuntu環境におけるcaffe環境整備を以下ブログを踏襲して動作確認(ubuntu14.04,CUDA7.0,cuDNNv3)
参考:https://github.com/BVLC/caffe/wiki/Install-Caffe-on-EC2-from-scratch-(Ubuntu,-CUDA-7,-cuDNN)
-> 最新のCUDA7.5,cuDNN4.0でもうまく行った。

opencvは2.4.9 (or 2.4.10?)をインストールする
参考:http://www.samontab.com/web/2014/06/installing-opencv-2-4-9-in-ubuntu-14-04-lts/
->opencv3.0.0でも試したがうまく行かず。

opencvのビルド中に
nvcc fatal : Unsupported gpu architecture 'compute_11'
と出たら、以下のサイトを参考にopencv/buildのcmake時にGPU architectureを以下のbashで指定して修正
http://stackoverflow.com/questions/28010399/build-opencv-with-cuda-support

cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_TIFF=ON -D BUILD_EXAMPLES=ON -D CUDA_GENERATION=Auto -D BUILD_NEW_PYTHON_SUPPORT=ON ..

NCVPixelOperations.hppに関するエラーが出たら、code内のtemplate関数についているstaticをすべて消す
参考:https://devtalk.nvidia.com/default/topic/793805/opencv-2-4-9-won-t-compile/

opencv install中にlibpng16.so.16等のlinkageエラーが出たら、該当する.so等を見つけてきてldconfigにひも付け。
参考:http://stackoverflow.com/questions/32405035/caffe-installation-opencv-libpng16-so-16-linkage-issues

fully convolutionに関するcaffe整備を行う。ただしGPU(CUDA,cuDNN)利用
参考:http://akiomik.hatenablog.jp/entry/2016/01/10/230118

make runtestのコンパイルエラー回避のため
/usr/lib/x86_64-linux-gnu/libhdf5_hl.so.10
/usr/lib/x86_64-linux-gnu/libhdf5.so.10

/usr/lib/x86_64-linux-gnu/libhdf5_hl.so.8
/usr/lib/x86_64-linux-gnu/libhdf5.so.8
へコピーする必要
参考:https://github.com/BVLC/caffe/issues/1463

libdc1394 error: Failed to initialize libdc1394
というエラーが出たら
sudo ln /dev/null /dev/raw1394
で対処
参考:http://stackoverflow.com/questions/12689304/ctypes-error-libdc1394-error-failed-to-initialize-libdc1394

import caffe時にinvalid syntaxが出たらその行を消すなり、..を.にするなりして修正。
(これで本当に良いのかは不明)

その他参考

ubuntu-desktopをapt-getで入れてしまうと完全にバグるので気をつける。

caffe.ioとnumpyのioが競合するときは下を参考に修正
http://qiita.com/CORDEA/items/9fad27ae024928b6a7b1

aws s3をec2にマウントする
参考:https://www.robusta-hosting.eu/en/blog/development/2015/04/install-s3fs-ubuntu-1404-lts

dropboxのcuiベースな同期をec2上で行う。
参考:http://d.hatena.ne.jp/TrinityT/20141225/1419512389

emacsのpython環境jedi
参考:http://d.hatena.ne.jp/n-channel/20131220/1387551080

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