Skip to content

Commit fdf4e09

Browse files
authored
add detailed build steps for linux
1 parent 9e6d197 commit fdf4e09

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

README.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,35 @@ Synopsys Caffe is a modified version of the popular [Caffe Deep Learning framewo
33
It combines multiple customized branches and includes a large range of patches to support diverse models. See [FEATURES.md](https://github.com/foss-for-synopsys-dwc-arc-processors/synopsys-caffe/blob/master/FEATURES.md) for a short overview.
44

55
## Installation
6-
Please check out the prerequisites and read the detailed notes at the [BVLC Caffe Installation](http://caffe.berkeleyvision.org/installation.html) at first.
6+
Please check out the prerequisites and read the detailed notes at the [BVLC Caffe Installation](http://caffe.berkeleyvision.org/installation.html) if this is your first time to install Caffe.
77

88
### Linux
9-
Please follow the [instructions](https://github.com/foss-for-synopsys-dwc-arc-processors/synopsys-caffe/commit/10169e55f4d460c52067792d5f36b9113fa9a705#comments) to install and set the **matio** support before building Caffe.
9+
A simple guide:
10+
1. Ensure that you have all the dependencies mentioned at the [BVLC Caffe Installation](http://caffe.berkeleyvision.org/installation.html) for your OS installed (protobuf, leveldb, snappy, opencv, hdf5-serial, protobuf-compiler, BLAS, Python, CUDA etc.)
11+
2. Also Install [matio](https://github.com/tbeu/matio) in your environment. After that, add [your installed matio path]/lib to the LD_LIBRARY_PATH.
12+
```Shell
13+
export LD_LIBRARY_PATH=[your installed matio path]/lib:${LD_LIBRARY_PATH}
14+
```
15+
3. Checkout the Synopsys Caffe **master** branch. Configure the build by copying and modifying the example Makefile.config for your setup.
16+
```Shell
17+
git clone https://github.com/foss-for-synopsys-dwc-arc-processors/synopsys-caffe.git
18+
cd synopsys-caffe
19+
cp Makefile.config.example Makefile.config
20+
# Modify Makefile.config to suit your needs, e.g. enable/disable the CPU-ONLY, CUDNN, NCCL and set the path for CUDA, Python and BLAS.
21+
# If needed, add [your installed matio path]/include to INCLUDE_DIRS and [your installed matio path]/lib to LIBRARY_DIRS.
22+
```
23+
4. Build Caffe and run the tests.
24+
```Shell
25+
make all
26+
make pycaffe
27+
make test
28+
make runtest
29+
# If no error occurs, you can add the caffe path to the environment for easy use.
30+
export SYNOPSYS_CAFFE_HOME=[your synopsys-caffe root folder path]
31+
export PATH=${SYNOPSYS_CAFFE_HOME}/build/tools:${PATH}
32+
export PYTHONPATH=${SYNOPSYS_CAFFE_HOME}/python:${PYTHONPATH}
33+
```
34+
1035
### Windows
1136
A simple guide:
1237
1. Download the Visual Studio 2015 Update 3. Choose to install the support for visual C++ instead of applying the default settings.
@@ -18,7 +43,7 @@ C:\Projects> git clone https://github.com/foss-for-synopsys-dwc-arc-processors/s
1843
C:\Projects> cd synopsys-caffe
1944
:: Edit any of the options inside build_win.cmd to suit your needs
2045
C:\Projects\synopsys-caffe> scripts\build_win.cmd
21-
:: If no errors occurs, the caffe.exe will be created at C:\Projects\synopsys-caffe\build\tools\Release after a successful build.
46+
:: If no error occurs, the caffe.exe will be created at C:\Projects\synopsys-caffe\build\tools\Release after a successful build.
2247
```
2348
Other detailed installation instructions can be found [here](https://github.com/BVLC/caffe/blob/windows/README.md).
2449

0 commit comments

Comments
 (0)