Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Xiaomi
Mace
提交
7d765e32
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,发现更多精彩内容 >>
提交
7d765e32
编写于
7月 05, 2018
作者:
Y
yejianwu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor dockerfiles and update docs
上级
803f2621
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
78 addition
and
68 deletion
+78
-68
docker/gitlab-runner/Dockerfile
docker/gitlab-runner/Dockerfile
+1
-1
docker/mace-dev-lite/Dockerfile
docker/mace-dev-lite/Dockerfile
+25
-62
docker/mace-dev/Dockerfile
docker/mace-dev/Dockerfile
+46
-0
docs/getting_started/how_to_build.rst
docs/getting_started/how_to_build.rst
+6
-5
未找到文件。
docker/gitlab-runner/Dockerfile
浏览文件 @
7d765e32
FROM
xiaomimace/mace-dev:latest
FROM
registry.cn-hangzhou.aliyuncs.com/
xiaomimace/mace-dev:latest
# Update source
RUN
apt-get update
-y
...
...
docker/Dockerfile
→
docker/
mace-dev-lite/
Dockerfile
浏览文件 @
7d765e32
FROM
ubuntu:16.04
WORKDIR
/
# Update source
RUN
apt-get update
-y
## Basic tools
RUN
apt-get
install
-y
--no-install-recommends
apt-utils
# Basic tools
RUN
apt-get
install
-y
--no-install-recommends
\
apt-utils
\
build-essential
\
cmake
\
curl
\
...
...
@@ -32,11 +34,15 @@ RUN apt-get install -y --no-install-recommends \
bsdmainutils
RUN
pip
install
--upgrade
pip
# Upgrade CMake
RUN
wget https://cmake.org/files/v3.11/cmake-3.11.3-Linux-x86_64.tar.gz
-P
/tmp/
&&
\
tar
zxf /tmp/cmake-3.11.3-Linux-x86_64.tar.gz
--strip-components
=
1
-C
/usr/local/
&&
\
update-alternatives
--install
/usr/bin/cmake cmake /usr/local/bin/cmake 1
--force
&&
\
rm
-f
/tmp/cmake-3.11.3-Linux-x86_64.tar.gz
# Setup vim
RUN
apt-get
install
-y
--no-install-recommends
\
locales
\
vim
RUN
locale-gen en_US.UTF-8
ENV
LC_CTYPE=en_US.UTF-8
ENV
LC_ALL=en_US.UTF-8
ENV
TERM xterm-256color
# Set up Bazel.
# Running bazel inside a `docker build` command causes trouble, cf:
...
...
@@ -49,63 +55,21 @@ RUN echo "build --spawn_strategy=standalone --genrule_strategy=standalone" \
>>
/etc/bazel.bazelrc
# Install the most recent bazel release.
ENV
BAZEL_VERSION 0.13.1
WORKDIR
/
RUN
mkdir
/bazel
&&
\
cd
/bazel
&&
\
RUN
mkdir
/tmp/bazel
&&
\
cd
/tmp/bazel
&&
\
wget https://github.com/bazelbuild/bazel/releases/download/
$BAZEL_VERSION
/bazel-
$BAZEL_VERSION
-installer-linux-x86_64
.sh
&&
\
chmod
+x bazel-
*
.sh
&&
\
./bazel-
$BAZEL_VERSION
-installer-linux-x86_64
.sh
&&
\
cd
/
&&
\
rm
-
f
/bazel/bazel-
$BAZEL_VERSION
-installer-linux-x86_64
.sh
rm
-
rf
/tmp/bazel
# Setup vim
RUN
apt-get update
-y
RUN
apt-get
install
-y
--no-install-recommends
\
locales
\
vim
RUN
mkdir
-p
~/.vim/autoload ~/.vim/bundle
&&
\
curl
-LSso
~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
RUN
mkdir
-p
~/.vim/bundle
RUN
cd
~/.vim/bundle
&&
\
git clone https://github.com/scrooloose/nerdtree.git
&&
\
git clone https://github.com/vim-syntastic/syntastic.git
&&
\
git clone https://github.com/vim-airline/vim-airline.git
&&
\
git clone https://github.com/altercation/vim-colors-solarized.git
&&
\
git clone https://github.com/bazelbuild/vim-ft-bzl.git
&&
\
git clone https://github.com/google/vim-maktaba.git
&&
\
git clone https://github.com/google/vim-codefmt.git
RUN
curl
-LSso
~/.vimrc https://gist.githubusercontent.com/llhe/71c5802919debd5825c100c0135478a7/raw/16a35020cc65f9c25d0cf8f11a3ba7b345a1271d/.vimrc
RUN
locale-gen en_US.UTF-8
ENV
LC_CTYPE=en_US.UTF-8
ENV
LC_ALL=en_US.UTF-8
ENV
TERM xterm-256color
# Extra packges
RUN
apt-get
install
-y
--no-install-recommends
\
telnet
\
net-tools
\
inetutils-ping
\
screen
\
android-tools-adb
\
htop
# Download NDK in different versions
# Download NDK
RUN
cd
/opt/
&&
\
wget
-q
https://dl.google.com/android/repository/android-ndk-r12b-linux-x86_64.zip
&&
\
unzip
-q
android-ndk-r12b-linux-x86_64.zip
&&
\
rm
-f
android-ndk-r12b-linux-x86_64.zip
&&
\
wget
-q
https://dl.google.com/android/repository/android-ndk-r15c-linux-x86_64.zip
&&
\
unzip
-q
android-ndk-r15c-linux-x86_64.zip
&&
\
rm
-f
android-ndk-r15c-linux-x86_64.zip
&&
\
wget
-q
https://dl.google.com/android/repository/android-ndk-r16-linux-x86_64.zip
&&
\
unzip
-q
android-ndk-r16-linux-x86_64.zip
&&
\
rm
-f
android-ndk-r16-linux-x86_64.zip
rm
-f
android-ndk-r15c-linux-x86_64.zip
ENV
ANDROID_NDK_VERSION r1
2b
ENV
ANDROID_NDK_VERSION r1
5c
ENV
ANDROID_NDK /opt/android-ndk-${ANDROID_NDK_VERSION}
ENV
ANDROID_NDK_HOME ${ANDROID_NDK}
...
...
@@ -113,16 +77,15 @@ ENV ANDROID_NDK_HOME ${ANDROID_NDK}
ENV
PATH ${PATH}:${ANDROID_NDK_HOME}
# Install tools
RUN
apt-get
install
-y
--no-install-recommends
\
android-tools-adb
RUN
pip
install
-i
http://pypi.douban.com/simple/
--trusted-host
pypi.douban.com setuptools
RUN
pip
install
-i
http://pypi.douban.com/simple/
--trusted-host
pypi.douban.com
tensorflow
==
1.8.0
\
numpy>
=
1.14.0
\
RUN
pip
install
-i
http://pypi.douban.com/simple/
--trusted-host
pypi.douban.com
\
tensorflow
==
1.8.0
\
"numpy>=1.14.0"
\
scipy
\
jinja2
\
pyyaml
\
sh
==
1.12.14
\
pycodestyle
==
2.4.0
\
filelock
\
sphinx
\
sphinx-autobuild
\
sphinx_rtd_theme
\
recommonmark
filelock
docker/mace-dev/Dockerfile
0 → 100644
浏览文件 @
7d765e32
FROM
registry.cn-hangzhou.aliyuncs.com/xiaomimace/mace-dev-lite:latest
# Install tools
RUN
apt-get
install
-y
--no-install-recommends
\
telnet
\
net-tools
\
inetutils-ping
\
screen
\
htop
RUN
pip
install
-i
http://pypi.douban.com/simple/
--trusted-host
pypi.douban.com
\
sphinx
\
sphinx-autobuild
\
sphinx_rtd_theme
\
recommonmark
# Customize vim
RUN
mkdir
-p
~/.vim/autoload ~/.vim/bundle
&&
\
curl
-LSso
~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
RUN
mkdir
-p
~/.vim/bundle
RUN
cd
~/.vim/bundle
&&
\
git clone https://github.com/scrooloose/nerdtree.git
&&
\
git clone https://github.com/vim-syntastic/syntastic.git
&&
\
git clone https://github.com/vim-airline/vim-airline.git
&&
\
git clone https://github.com/altercation/vim-colors-solarized.git
&&
\
git clone https://github.com/bazelbuild/vim-ft-bzl.git
&&
\
git clone https://github.com/google/vim-maktaba.git
&&
\
git clone https://github.com/google/vim-codefmt.git
RUN
curl
-LSso
~/.vimrc https://gist.githubusercontent.com/llhe/71c5802919debd5825c100c0135478a7/raw/16a35020cc65f9c25d0cf8f11a3ba7b345a1271d/.vimrc
# Upgrade CMake
RUN
wget https://cmake.org/files/v3.11/cmake-3.11.3-Linux-x86_64.tar.gz
-P
/tmp/
&&
\
tar
zxf /tmp/cmake-3.11.3-Linux-x86_64.tar.gz
--strip-components
=
1
-C
/usr/local/
&&
\
update-alternatives
--install
/usr/bin/cmake cmake /usr/local/bin/cmake 1
--force
&&
\
rm
-f
/tmp/cmake-3.11.3-Linux-x86_64.tar.gz
# mace-dev-lite image already included NDK r15c
## Download other NDK r12b
RUN
cd
/opt/
&&
\
wget
-q
https://dl.google.com/android/repository/android-ndk-r12b-linux-x86_64.zip
&&
\
unzip
-q
android-ndk-r12b-linux-x86_64.zip
&&
\
rm
-f
android-ndk-r12b-linux-x86_64.zip
## Download other NDK r16
RUN
cd
/opt/
&&
\
wget
-q
https://dl.google.com/android/repository/android-ndk-r16-linux-x86_64.zip
&&
\
unzip
-q
android-ndk-r16-linux-x86_64.zip
&&
\
rm
-f
android-ndk-r16-linux-x86_64.zip
docs/getting_started/how_to_build.rst
浏览文件 @
7d765e32
...
...
@@ -72,14 +72,13 @@ you can build the image from it,
..
code
::
sh
cd
docker
docker
build
-
t
xiaomimace
/
mace
-
dev
docker
build
-
t
registry
.
cn
-
hangzhou
.
aliyuncs
.
com
/
xiaomimace
/
mace
-
dev
-
lite
./
docker
/
mace
-
dev
-
lite
or
pull
the
pre
-
built
image
from
Docker
Hub
,
..
code
::
sh
docker
pull
xiaomimace
/
mace
-
dev
docker
pull
registry
.
cn
-
hangzhou
.
aliyuncs
.
com
/
xiaomimace
/
mace
-
dev
-
lite
and
then
run
the
container
with
the
following
command
.
...
...
@@ -87,8 +86,10 @@ and then run the container with the following command.
#
Create
container
#
Set
'host'
network
to
use
ADB
docker
run
-
it
--
rm
--
privileged
-
v
/
dev
/
bus
/
usb
:/
dev
/
bus
/
usb
--
net
=
host
\
-
v
/
local
/
path
:/
container
/
path
xiaomimace
/
mace
-
dev
/
bin
/
bash
docker
run
-
it
--
privileged
-
v
/
dev
/
bus
/
usb
:/
dev
/
bus
/
usb
--
net
=
host
\
-
v
/
local
/
path
:/
container
/
path
\
registry
.
cn
-
hangzhou
.
aliyuncs
.
com
/
xiaomimace
/
mace
-
dev
-
lite
\
/
bin
/
bash
Usage
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录