LoginSignup
1
2

More than 5 years have passed since last update.

win7でDigitsを構築

Last updated at Posted at 2016-10-17

【参考】
1. 構築の手順
2. Caffeビルド設定

VS 2013 Pro

CAFFEをビルドする為、VisualStudio2013 をインストールして、パソコン再起動

CUDA7.5

CUDA7.5DLし、デフォルト設定でインストール

cuDNN4

cudnn-7.0-win-x64-v4.0-prod.zipをDLし、解凍。
* cuda\include\cudnn64_4.dll => C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\bin にコピー
* cuda\include\cudnn.h => C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\include にコピー
* cuDNN\lib\x64\cudnn.lib => C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\lib にコピー
* cuDNN\lib\x64\cudnn_static.lib => C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\lib にコピー

Python27

Python 2.7.11 64bit をダウンロードして *C:\python27\ * にインストール

msiexec /i VCForPython27.msi ALLUSERS=1

下記必要なパッケージをここからダウンロード

  • numpy-1.11.0+mkl-cp27-cp27m-win_amd64.whl
  • scipy-0.17.0-cp27-none-win_amd64.whl
  • matplotlib-1.5.1-cp27-none-win_amd64.whl
  • scikit_image-0.12.3-cp27-cp27m-win_amd64.whl
  • h5py-2.6.0-cp27-cp27m-win_amd64.whl

 C:\python27\  を環境変数 Path に登録
管理者権限でcmdを開いて、パッケージをインストール

python -m pip install cython
python -m pip install numpy-1.11.0+mkl-cp27-cp27m-win_amd64.whl
python -m pip install scipy-0.17.0-cp27-none-win_amd64.whl
python -m pip install matplotlib-1.5.1-cp27-none-win_amd64.whl
python -m pip install scikit_image-0.12.3-cp27-cp27m-win_amd64.whl
python -m pip install h5py-2.6.0-cp27-cp27m-win_amd64.whl

Caffe

Caffe の最新版をDLし、c:\users\ [userName] \caffeとする。

ビルド前の準備

  • 各プロジェクトにて右クリック⇒プロパティー⇒C/C++⇒「警告をエラーとして扱う」を「いいえ」に設定
  • \windows\CommonSettings.props.example を CommonSettings.propsにリネームして必要項目設定

    • ⇒ true
    • ⇒ C:\python27\
  • caffe\windows\caffe\caffe.vcxproj を修正

text: 変更前
<PostBuildEvent>
<Command>"$(ScriptsDir)\FixGFlagsNaming.cmd" "$(OutDir)" $(Configuration)</Command>
</PostBuildEvent>
<ClCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions);CAFFE_VERSION=1.0.0-rc3</PreprocessorDefinitions>
</ClCompile>

text: 変更後
<PostBuildEvent>
<Command>"$(ScriptsDir)\FixGFlagsNaming.cmd" "$(OutDir)" $(Configuration)</Command>
</PostBuildEvent>
<ClCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions);CAFFE_VERSION=1.0.0-rc3</PreprocessorDefinitions>
</ClCompile>

ビルド成功したら

  • ** \caffe\Build\x64\Release\pycaffe\caffe ** をフォルダごと ** c:\python27\lib\site-packages ** にコピーします。
  • ** c:\users\ [userName] \caffe \Build\x64\Release ** を環境変数Pathに追加
  • PC再起動

Graphviz

GraphvizをDLし、** c:\graphviz ** にインストール。パスにスペースが入ってはいけない為注意してください。

msiexec /i Graphviz.msi ALLUSERS=1

** c:\graphviz\bin ** を環境変数Pathに追加

opencv

opencv-2.4.13.exeをDLして解凍、
\opencv\build\python\2.7\x64\cv2.pyd ⇒ C:\Python27\Lib\site-packages にコピー

Digits

git clone https://github.com/nvidia/digits digits-4.0
git checkout -b digits-4.0 remotes/origin/digits-4.0

Pillow3.1.1 をpipでインストールしようとするとエラーが起きるので
ここからDLしてインストール
これが終わってから、

python -m pip install -r requirements.txt
# requirementsに載っているパッケージが全部、正しいVerでインストールされたことを確認
python -m pip list
# readline をインストール
python -m pip install pyreadline
# サーバー起動(localhost:5000)
python digits-devserver
1
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
1
2