Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleDetection
提交
193edfa7
P
PaddleDetection
项目概览
PaddlePaddle
/
PaddleDetection
大约 1 年 前同步成功
通知
695
Star
11112
Fork
2696
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
184
列表
看板
标记
里程碑
合并请求
40
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
184
Issue
184
列表
看板
标记
里程碑
合并请求
40
合并请求
40
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
193edfa7
编写于
1月 18, 2019
作者:
T
Tao Luo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove legacy build_android and build_ios
test=develop
上级
3ede8b67
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
1 addition
and
170 deletion
+1
-170
.travis.yml
.travis.yml
+0
-2
paddle/scripts/paddle_build.sh
paddle/scripts/paddle_build.sh
+1
-113
tools/manylinux1/Dockerfile.android
tools/manylinux1/Dockerfile.android
+0
-55
未找到文件。
.travis.yml
浏览文件 @
193edfa7
...
...
@@ -4,7 +4,6 @@ cache:
-
$HOME/.ccache
-
$HOME/.cache/pip
-
$TRAVIS_BUILD_DIR/build/third_party
-
$TRAVIS_BUILD_DIR/build_android/third_party
sudo
:
required
dist
:
trusty
services
:
...
...
@@ -13,7 +12,6 @@ os:
-
linux
env
:
-
JOB=check_style
-
JOB=build_android
addons
:
ssh_known_hosts
:
13.229.163.131
before_install
:
...
...
paddle/scripts/paddle_build.sh
浏览文件 @
193edfa7
...
...
@@ -26,8 +26,6 @@ function print_usage() {
echo
-e
"
\n
${
RED
}
Options
${
NONE
}
:
${
BLUE
}
build
${
NONE
}
: run build for x86 platform
${
BLUE
}
build_android
${
NONE
}
: run build for android platform
${
BLUE
}
build_ios
${
NONE
}
: run build for ios platform
${
BLUE
}
test
${
NONE
}
: run all unit tests
${
BLUE
}
single_test
${
NONE
}
: run a single unit test
${
BLUE
}
bind_test
${
NONE
}
: parallel tests bind to different GPU
...
...
@@ -301,110 +299,6 @@ EOF
make
install
-j
8
}
function
build_android
()
{
if
[
$ANDROID_ABI
==
"arm64-v8a"
]
;
then
ANDROID_ARCH
=
arm64
if
[
$ANDROID_API
-lt
21
]
;
then
echo
"Warning: arm64-v8a requires ANDROID_API >= 21."
ANDROID_API
=
21
fi
else
# armeabi, armeabi-v7a
ANDROID_ARCH
=
arm
fi
ANDROID_STANDALONE_TOOLCHAIN
=
$ANDROID_TOOLCHAINS_DIR
/
$ANDROID_ARCH
-android-
$ANDROID_API
cat
<<
EOF
============================================
Generating the standalone toolchain ...
${
ANDROID_NDK_HOME
}
/build/tools/make-standalone-toolchain.sh
--arch=
$ANDROID_ARCH
--platform=android-
$ANDROID_API
--install-dir=
${
ANDROID_STANDALONE_TOOLCHAIN
}
============================================
EOF
${
ANDROID_NDK_HOME
}
/build/tools/make-standalone-toolchain.sh
\
--arch
=
$ANDROID_ARCH
\
--platform
=
android-
$ANDROID_API
\
--install-dir
=
$ANDROID_STANDALONE_TOOLCHAIN
BUILD_ROOT
=
${
PADDLE_ROOT
}
/build_android
DEST_ROOT
=
${
PADDLE_ROOT
}
/install_android
mkdir
-p
$BUILD_ROOT
cd
$BUILD_ROOT
if
[
$ANDROID_ABI
==
"armeabi-v7a"
]
;
then
cmake
-DCMAKE_SYSTEM_NAME
=
Android
\
-DANDROID_STANDALONE_TOOLCHAIN
=
$ANDROID_STANDALONE_TOOLCHAIN
\
-DANDROID_ABI
=
$ANDROID_ABI
\
-DANDROID_ARM_NEON
=
ON
\
-DANDROID_ARM_MODE
=
ON
\
-DHOST_C_COMPILER
=
/usr/bin/gcc
\
-DHOST_CXX_COMPILER
=
/usr/bin/g++
\
-DCMAKE_INSTALL_PREFIX
=
$DEST_ROOT
\
-DCMAKE_BUILD_TYPE
=
MinSizeRel
\
-DUSE_EIGEN_FOR_BLAS
=
ON
\
-DWITH_C_API
=
ON
\
-DWITH_SWIG_PY
=
OFF
\
..
elif
[
$ANDROID_ABI
==
"arm64-v8a"
]
;
then
cmake
-DCMAKE_SYSTEM_NAME
=
Android
\
-DANDROID_STANDALONE_TOOLCHAIN
=
$ANDROID_STANDALONE_TOOLCHAIN
\
-DANDROID_ABI
=
$ANDROID_ABI
\
-DANDROID_ARM_MODE
=
ON
\
-DHOST_C_COMPILER
=
/usr/bin/gcc
\
-DHOST_CXX_COMPILER
=
/usr/bin/g++
\
-DCMAKE_INSTALL_PREFIX
=
$DEST_ROOT
\
-DCMAKE_BUILD_TYPE
=
MinSizeRel
\
-DUSE_EIGEN_FOR_BLAS
=
OFF
\
-DWITH_C_API
=
ON
\
-DWITH_SWIG_PY
=
OFF
\
..
elif
[
$ANDROID_ABI
==
"armeabi"
]
;
then
cmake
-DCMAKE_SYSTEM_NAME
=
Android
\
-DANDROID_STANDALONE_TOOLCHAIN
=
$ANDROID_STANDALONE_TOOLCHAIN
\
-DANDROID_ABI
=
$ANDROID_ABI
\
-DANDROID_ARM_MODE
=
ON
\
-DHOST_C_COMPILER
=
/usr/bin/gcc
\
-DHOST_CXX_COMPILER
=
/usr/bin/g++
\
-DCMAKE_INSTALL_PREFIX
=
$DEST_ROOT
\
-DCMAKE_BUILD_TYPE
=
MinSizeRel
\
-DWITH_C_API
=
ON
\
-DWITH_SWIG_PY
=
OFF
\
..
else
echo
"Invalid ANDROID_ABI:
$ANDROID_ABI
"
fi
cat
<<
EOF
============================================
Building in
$BUILD_ROOT
...
============================================
EOF
make
-j
`
nproc
`
make
install
-j
`
nproc
`
}
function
build_ios
()
{
# Create the build directory for CMake.
mkdir
-p
${
PADDLE_ROOT
}
/build
cd
${
PADDLE_ROOT
}
/build
# Compile paddle binaries
cmake ..
\
-DCMAKE_SYSTEM_NAME
=
iOS
\
-DIOS_PLATFORM
=
OS
\
-DCMAKE_OSX_ARCHITECTURES
=
"arm64"
\
-DWITH_C_API
=
ON
\
-DUSE_EIGEN_FOR_BLAS
=
ON
\
-DWITH_TESTING
=
OFF
\
-DWITH_SWIG_PY
=
OFF
\
-DCMAKE_BUILD_TYPE
=
Release
make
-j
2
}
function
run_test
()
{
mkdir
-p
${
PADDLE_ROOT
}
/build
cd
${
PADDLE_ROOT
}
/build
...
...
@@ -639,7 +533,7 @@ EOF
case
$LIB_TYPE
in
full
)
# Build full Paddle Python module. Will timeout without caching 'copy_paddle_pybind' first
make
-j
`
nproc
`
gen_proto_py
framework_py_proto copy_paddle_pybind paddle_python
make
-j
`
nproc
`
framework_py_proto copy_paddle_pybind paddle_python
;;
pybind
)
# Build paddle pybind library. Takes 49 minutes to build. Might timeout
...
...
@@ -876,12 +770,6 @@ function main() {
build
gen_dockerfile
${
PYTHON_ABI
:-
""
}
;;
build_android
)
build_android
;;
build_ios
)
build_ios
;;
test
)
run_test
;;
...
...
tools/manylinux1/Dockerfile.android
已删除
100644 → 0
浏览文件 @
3ede8b67
FROM ubuntu:16.04
MAINTAINER PaddlePaddle Authors <paddle-dev@baidu.com>
ARG UBUNTU_MIRROR
RUN /bin/bash -c 'if [[ -n ${UBUNTU_MIRROR} ]]; then sed -i 's#http://archive.ubuntu.com/ubuntu#${UBUNTU_MIRROR}#g' /etc/apt/sources.list; fi'
# ENV variables
ARG ANDROID_ABI
ARG ANDROID_API
ENV ANDROID_ABI=${ANDROID_ABI:-"armeabi-v7a"}
ENV ANDROID_API=${ANDROID_API:-21}
ENV HOME=/root \
ANDROID_NDK_HOME=/opt/android-ndk-linux \
ANDROID_TOOLCHAINS_DIR=/opt/toolchains
RUN apt-get update && \
apt-get install -y \
git python-dev python-pip python-numpy \
wget curl tar unzip gcc g++ locales clang-format-3.8 swig cmake && \
apt-get clean -y
# Install Go and glide
RUN wget -qO- go.tgz https://storage.googleapis.com/golang/go1.8.1.linux-amd64.tar.gz | \
tar -xz -C /usr/local && \
mkdir /root/gopath && \
mkdir /root/gopath/bin && \
mkdir /root/gopath/src
ENV GOROOT=/usr/local/go GOPATH=/root/gopath
# should not be in the same line with GOROOT definition, otherwise docker build could not find GOROOT.
ENV PATH=${PATH}:${GOROOT}/bin:${GOPATH}/bin
# git credential to skip password typing
RUN git config --global credential.helper store
# Fix locales to en_US.UTF-8
RUN localedef -i en_US -f UTF-8 en_US.UTF-8
RUN pip install --upgrade pip==9.0.3 && \
pip install -U 'protobuf==3.1.0' && \
pip install -U wheel sphinx && \
pip install pre-commit
# Android NDK
RUN mkdir -p ${ANDROID_TOOLCHAINS_DIR} && \
mkdir -p /opt/android-ndk-tmp && \
cd /opt/android-ndk-tmp && \
wget -q https://dl.google.com/android/repository/android-ndk-r14b-linux-x86_64.zip && \
unzip -q android-ndk-r14b-linux-x86_64.zip && \
mv android-ndk-r14b ${ANDROID_NDK_HOME} && \
rm -rf /opt/android-ndk-tmp
CMD ["bash", "/paddle/paddle/scripts/docker/build_android.sh"]
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录