减小docker image size
Created by: gangliao
经过@hedaoyuan提醒,我采用release编译,每个二进制从100MB减小到了10MB.. 少了90M.... 之后发布image可以考虑用这种编译。
编译:可以看到,我把所有依赖以静态库的方式编译进去了。。。
Library/Developer/CommandLineTools/usr/bin/c++ -bundle -undefined
.12-x86_64-2.7/Paddle_wrap.o -L/usr/local/lib -L/usr/local/opt/open
.macosx-10.12-x86_64-2.7/py_paddle/_swig_paddle.so -Wl,-all_load -L
L/Users/liaogang/baidu/Paddle/build/paddle/function -L/Users/liaoga
gang/baidu/Paddle/build/paddle/parameter -L/Users/liaogang/baidu/Pa
u/Paddle/build/paddle/api -L/Users/liaogang/baidu/Paddle/build/padd
dle/pserver -L/Users/liaogang/baidu/Paddle/build/paddle/trainer -L/
o -lpaddle_gserver -lpaddle_function -lpaddle_pserver -lpaddle_trai
ddle_math -lpaddle_utils -lpaddle_proto -lpaddle_cuda -lpaddle_api
/protobuf/lib/libprotobuf.a /Users/liaogang/baidu/Paddle/third_part
du/Paddle/third_party/install/gflags/lib/libgflags.a /Users/liaogan
.a /Users/liaogang/baidu/Paddle/third_party/install/openblas/lib/li
installing to build/bdist.macosx-10.12-x86_64/wheel
然而,
一些第三库是否可以考虑已release的形式链接进来?