安装各种补丁和组件,缺啥装啥。

python 采用 2.7.13 最新版。

安装工具  homebrew , pip

很繁琐,但是没难度。

由于本人macbook pro不支持CUDA,所以不用安装。

$mvim Makefile.config

尤其注意  PYTHON_INCLUDE,PYTHON_LIB

===

## Refer to http://caffe.berkeleyvision.org/installation.html
# Contributions simplifying and improving our build system are welcome!

# cuDNN acceleration switch (uncomment to build with cuDNN).
# USE_CUDNN := 1

# CPU-only switch (uncomment to build without GPU support).
CPU_ONLY := 1

# uncomment to disable IO dependencies and corresponding data layers
USE_OPENCV := 0
USE_LEVELDB := 0
USE_LMDB := 0

# uncomment to allow MDB_NOLOCK when reading LMDB files (only if necessary)
# You should not set this flag if you will be reading LMDBs with any
# possibility of simultaneous read and write
# ALLOW_LMDB_NOLOCK := 1

# Uncomment if you're using OpenCV 3
# OPENCV_VERSION := 3

# To customize your choice of compiler, uncomment and set the following.
# N.B. the default for Linux is g++ and the default for OSX is clang++
# CUSTOM_CXX := g++

# CUDA directory contains bin/ and lib/ directories that we need.
CUDA_DIR := /usr/local/cuda
# On Ubuntu 14.04, if cuda tools are installed via
# "sudo apt-get install nvidia-cuda-toolkit" then use this instead:
# CUDA_DIR := /usr

# CUDA architecture setting: going with all of them.
# For CUDA < 6.0, comment the *_50 through *_61 lines for compatibility.
# For CUDA < 8.0, comment the *_60 and *_61 lines for compatibility.
CUDA_ARCH := -gencode arch=compute_20,code=sm_20 \
-gencode arch=compute_20,code=sm_21 \
-gencode arch=compute_30,code=sm_30 \
-gencode arch=compute_35,code=sm_35 \
-gencode arch=compute_50,code=sm_50 \
-gencode arch=compute_52,code=sm_52 \
-gencode arch=compute_60,code=sm_60 \
-gencode arch=compute_61,code=sm_61 \
-gencode arch=compute_61,code=compute_61

# BLAS choice:
# atlas for ATLAS (default)
# mkl for MKL
# open for OpenBlas
BLAS := open
# Custom (MKL/ATLAS/OpenBLAS) include and lib directories.
# Leave commented to accept the defaults for your choice of BLAS
# (which should work)!
# BLAS_INCLUDE := /path/to/your/blas
# BLAS_LIB := /path/to/your/blas

# Homebrew puts openblas in a directory that is not on the standard search path
BLAS_INCLUDE := $(shell brew --prefix openblas)/include
BLAS_LIB := $(shell brew --prefix openblas)/lib

# This is required only if you will compile the matlab interface.
# MATLAB directory should contain the mex binary in /bin.
# MATLAB_DIR := /usr/local
# MATLAB_DIR := /Applications/MATLAB_R2012b.app

# NOTE: this is required only if you will compile the python interface.
# We need to be able to find Python.h and numpy/arrayobject.h.
PYTHON_INCLUDE := /usr/include/python2.7 \
/usr/local/Cellar/numpy/1.12.1/lib/python2.7/site-packages/numpy/core/include
# Anaconda Python distribution is quite popular. Include path:
# Verify anaconda location, sometimes it's in root.
# ANACONDA_HOME := $(HOME)/anaconda
# PYTHON_INCLUDE := $(ANACONDA_HOME)/include \
# $(ANACONDA_HOME)/include/python2.7 \
# $(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include

# We need to be able to find libpythonX.X.so or .dylib.
PYTHON_LIB := /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib
# PYTHON_LIB := $(ANACONDA_HOME)/lib

# Homebrew installs numpy in a non standard path (keg only)
# PYTHON_INCLUDE += $(dir $(shell python -c 'import numpy.core; print(numpy.core.__file__)'))/include
# PYTHON_LIB += $(shell brew --prefix numpy)/lib

# Uncomment to support layers written in Python (will link against Python libs)
# WITH_PYTHON_LAYER := 1

# Whatever else you find you need goes here.
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib

# If Homebrew is installed at a non standard location (for example your home directory) and you use it for general dependencies
# INCLUDE_DIRS += $(shell brew --prefix)/include
# LIBRARY_DIRS += $(shell brew --prefix)/lib

# NCCL acceleration switch (uncomment to build with NCCL)
# https://github.com/NVIDIA/nccl (last tested version: v1.2.3-1+cuda8.0)
# USE_NCCL := 1

# Uncomment to use `pkg-config` to specify OpenCV library paths.
# (Usually not necessary -- OpenCV libraries are normally installed in one of the above $LIBRARY_DIRS.)
# USE_PKG_CONFIG := 1

# N.B. both build and distribute dirs are cleared on `make clean`
BUILD_DIR := build
DISTRIBUTE_DIR := distribute

# Uncomment for debugging. Does not work on OSX due to https://github.com/BVLC/caffe/issues/171
# DEBUG := 1

# The ID of the GPU that 'make runtest' will use to run unit tests.
TEST_GPUID := 0

# enable pretty build (comment to see full commands)
Q ?= @

===

编译:

make clean; make all -j8;

make runtest

make pytest;

在Mac os 10.11 下编译Berkeley caffe的更多相关文章

  1. MAC OS 10.11.1虚拟机免费下载已安装Xcode7图片后有下载地址

    MAC OS 10.11.1虚拟机免费下载已安装Xcode7图片后有下载地址 注意:已经下载过MAC OS 10.10.5虚拟机免费下载(可安装Xcode7)链接:http://www.cnblogs ...

  2. VirtualBox安装Mac OS 10.11——虚拟机安装黑苹果

    由于需要安装mac环境跑IOS应用,所以在虚拟机装个黑苹果. 一.下载虚拟机安装包,VirtualBox是官网下的最新版:  5.0.6 for Windows hosts x86/amd64  官网 ...

  3. 2016 Mac OS 10.11 CocoaPods的安装问题

    CocoaPods的安装问题: 1.首先用淘宝的Ruby镜像来访问CocoaPods,打开终端输入以下命令: (1)gem sources --remove  https://rubygems.org ...

  4. 解决mac OS 10.9 下python 在terminal下崩溃的问题

    Python 2.7.6 release candidate 1 was released on October 26, 2013. This is a 2.7 series bugfix relea ...

  5. Mac OS X系统下编译运行C代码

    1.使用编译器将源文件中的代码转换为二进制代码,这个过程叫做编译. 将终端的工作路径切换到源文件所在的路径. cc -c 源文件的名称.例如:cc -c main.c 如果没有意外的话,就会在当前工作 ...

  6. [Mac]Mac OS 10.11虚拟机搭建ReactNative遇坑记录

    1.命令行安装nvm,一定要加入/.bash_profile,加入以后需要执行source /.bash_profile,使nvm命令行立即生效 2.node一定要安装最新版本,不然执行npm ins ...

  7. cocoapods无法使用(mac os 10.11升级导致pod: command not found)

    之前安装了cocoapods, 那么输入 : sudo gem install -n /usr/local/bin cocoapods 如果还不行的话 首先在终端输入 gem sources -l 查 ...

  8. Mac os 10.11 更新ruby

    1.装cocoapods,ruby版本忒低->开始更新ruby->开始更新gem,这是一条不归路啊同志们,各种permission denied,各种路径不存在,各种路径没有读写权限,各种 ...

  9. Setup Tensorflow with GPU on Mac OSX 10.11

    Setup Tensorflow with GPU on OSX 10.11 环境描述 电脑:MacBook Pro 15.6 CPU: 2.7GHz 显卡: GT 650m 系统:OSX 10.11 ...

随机推荐

  1. Java基础(Java补码)

    原码,反码,补码是java数值运算的基础,在计算机程序中,数值运算是基于二进制的,也就是说底层是二进制运算.而数值有正数与负数,二进制只有0和1,如何表示负数,如何进行正负数的运算,这就是原反补的意义 ...

  2. 利用RALL机制来事项String类的赋值操作

    class String{ public: char *str; String(const char *ptr=NULL){ if(ptr==NULL) { str=NULL; }else{ str= ...

  3. linux上的图片查看器FEH_image_view

    Linux上的图片查看器, 简单,没有多余功能,打开快速,体积小 在终端用feh # 直接执行feh显示当前目录所有图片 feh # 或者指定图片名 feh pic1 pic2 pic3 # 显示一个 ...

  4. IP地址数据库 | 手机号段归属地数据库 | 行政区划省市区数据库

    2019年4月最新版 IP地址数据库 (全球版·国内版·国外版·掩码版·英文版) 全球旗舰版 454267行   国内精华版 244379行 演示  https://www.qqzeng.com/ip ...

  5. .Net Core技术研究-Span<T>和ValueTuple<T>

    性能是.Net Core一个非常关键的特性,今天我们重点研究一下ValueTuple<T>和Span<T>. 一.方法的多个返回值的实现,看ValueTuple<T> ...

  6. Linq基础+Lambda表达式对数据库的增删改及简单查询

    一.Linq to sql 类 高集成化的数据库访问技术 使用Linq可以代替之前的Ado.Net,省去了自己敲代码的实体类和数据访问类的大量工作 实体类: 添加一个Linq to sql 类 --- ...

  7. Nginx 修改用户权限

    [1]Nginx 修改用户权限 (1)修改前:Nginx系统默认用户权限是nobody 查看可知: (2)修改方法 欲使用root权限启动的. 修改 /usr/local/nginx/conf/ 下n ...

  8. oracle数据库开启与关闭

    先用CRT软件链接-——建立会话——telent/ssh——写服务器Ip——点击链接——输入密码  # su - oracle   打开数据库 # cmd   进入特权模式 $ sqlplus / a ...

  9. axios请求

    axios.get('/user?ID=12345') .then(function (response) { console.log(response); console.log(response. ...

  10. animate.css 动画的使用

    $('#animatedClose').removeClass().addClass('fadeInDownBig animated').one('webkitAnimationEnd mozAnim ...