*UPDATE*: Updated instructions at this link < http://www.shaneahmed.com/2017/07/build-caffe-pycaffe-and-matcaffe-on.html >
Requirements:
Download and install the following software's:
- Visual Studio 2015 https://www.visualstudio.com/downloads/
- Make 3.4 or higher https://cmake.org/download/
- Python 3.5 Anaconda x64 (Required to build pycaffe). https://repo.continuum.io/archive/Anaconda3-4.2.0-Windows-x86_64.exe
- CUDA 8.0 https://developer.nvidia.com/accelerated-computing-toolkit
- cuDNN v5.1 (optional) https://developer.nvidia.com/cudnn
- Matlab (Required to build matcaffe) http://mathworks.com
Instructions:
Install CUDA v8.0Extract cuDNN folder
Install Anaconda, make sure you select Register Anaconda as system path for Python 3.5Install and activate Matlab using your Matlab licence (only if you need to build matcaffe).Open command window in the desired folder "C:\Projects" (Shift+RightClick and Open Command Window here).Enter the following commands
Open scripts folder and edit build_win.cmd
- copy all files from bin folder to 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin'
- similarly from include to 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\include'
- and 'lib/x64' to ''C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\lib/x64'.
C:\Projects> git clone https://github.com/BVLC/caffe.git C:\Projects> cd caffe C:\Projects\caffe> git checkout windows
- set path for python and add path to Anaconda folder.
C:\Projects\caffe> scripts\build_win.cmd
You can find caffe.exe in C:\Projects\caffe\build\tools\release\caffe.exeEnter
C:\Projects\caffe> call build\libraries\prependpath.bat
Now you should be able to run
C:\Projects\caffe> build\tools\release\caffe.exe -help
Pycaffe instructions:
Enter the following commandsconda config --add channels conda-forge conda install ninja --yesCopy the contents of C:\Projects\caffe\python to [C:\Program Files\Anaconda3\]Lib\site-packages.Now run the following commands:
C:\Projects\caffe> python >>> import caffeYou should be able to successfully import and run pycaffe.