Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Xiaomi
Mace
提交
31dc70cc
Mace
项目概览
Xiaomi
/
Mace
通知
106
Star
40
Fork
27
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Mace
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
31dc70cc
编写于
8月 28, 2017
作者:
L
Liangliang He
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update dockerfile and README.md
上级
3ab487e1
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
16 addition
and
16 deletion
+16
-16
docker/Dockerfile
docker/Dockerfile
+3
-15
mace/examples/README.md
mace/examples/README.md
+13
-1
未找到文件。
docker/Dockerfile
浏览文件 @
31dc70cc
FROM
ubuntu:16.04
# Update source
RUN
sed
-i
's/http:\/\/archive\.ubuntu\.com\/ubuntu\//http:\/\/mirrors\.163\.com\/ubuntu\//g'
/etc/apt/sources.list
# Looks like mirrors.163.com does not work in xiaomi network
# RUN sed -i 's/http:\/\/archive\.ubuntu\.com\/ubuntu\//http:\/\/mirrors\.163\.com\/ubuntu\//g' /etc/apt/sources.list
RUN
apt-get update
-y
## Basic tools
...
...
@@ -37,7 +38,7 @@ ENV ANDROID_NDK_VERSION r15c
# download
RUN
mkdir
/opt/android-ndk-tmp
&&
\
cd
/opt/android-ndk-tmp
&&
\
wget https://dl.google.com/android/repository/android-ndk-
${
ANDROID_NDK_VERSION
}
-linux-x86_64
.zip
&&
\
wget
-q
https://dl.google.com/android/repository/android-ndk-
${
ANDROID_NDK_VERSION
}
-linux-x86_64
.zip
&&
\
# uncompress
unzip -q android-ndk-${ANDROID_NDK_VERSION}-linux-x86_64.zip && \
# move to its final location
...
...
@@ -50,19 +51,6 @@ RUN mkdir /opt/android-ndk-tmp && \
ENV
PATH ${PATH}:${ANDROID_NDK_HOME}
# Set up Bazel.
# We need to add a custom PPA to pick up JDK8, since trusty doesn't
# have an openjdk8 backport. openjdk-r is maintained by a reliable contributor:
# Matthias Klose (https://launchpad.net/~doko). It will do until
# we either update the base image beyond 14.04 or openjdk-8 is
# finally backported to trusty; see e.g.
# https://bugs.launchpad.net/trusty-backports/+bug/1368094
RUN
add-apt-repository
-y
ppa:openjdk-r/ppa
&&
\
apt-get update
&&
\
apt-get
install
-y
--no-install-recommends
openjdk-8-jdk openjdk-8-jre-headless
&&
\
apt-get clean
&&
\
rm
-rf
/var/lib/apt/lists/
*
# Running bazel inside a `docker build` command causes trouble, cf:
# https://github.com/bazelbuild/bazel/issues/134
# The easiest solution is to set up a bazelrc file forcing --batch.
...
...
mace/examples/README.md
浏览文件 @
31dc70cc
Examples
=======
To build the example:
*
Build the example
```
bazel build mace/examples:helloworld \
--crosstool_top=//external:android/crosstool \
--host_crosstool_top=@bazel_tools//tools/cpp:toolchain \
--cpu=armeabi-v7a
```
*
To run adb inside docker, the network should use 'host':
```
docker run -it --net=host mace-dev /bin/bash
```
*
Push and run the example
```
adb shell "mkdir /data/local/tmp/helloword"
adb shell push bazel-bin/mace/examples/helloworld /data/local/tmp/helloword
adb shell /data/local/tmp/helloword/helloworld
```
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录