Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
闹闹不闹!
Mace
提交
1b7f0303
Mace
项目概览
闹闹不闹!
/
Mace
与 Fork 源项目一致
Fork自
Xiaomi / Mace
通知
1
Star
1
Fork
0
代码
文件
提交
分支
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,发现更多精彩内容 >>
提交
1b7f0303
编写于
1月 19, 2018
作者:
Y
yejianwu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update README.md and add Dockerfile
上级
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
142 addition
and
0 deletion
+142
-0
Dockerfile
Dockerfile
+115
-0
README.md
README.md
+27
-0
未找到文件。
Dockerfile
0 → 100644
浏览文件 @
1b7f0303
FROM
ubuntu:16.04
# Update source
# 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
RUN
apt-get
install
-y
--no-install-recommends
apt-utils
RUN
apt-get
install
-y
--no-install-recommends
\
build-essential
\
cmake
\
curl
\
git
\
libcurl3-dev
\
libgoogle-glog-dev
\
libfreetype6-dev
\
libpng12-dev
\
libprotobuf-dev
\
libzmq3-dev
\
pkg-config
\
python-dev
\
python-pip
\
protobuf-compiler
\
rsync
\
software-properties-common
\
unzip
\
zip
\
zlib1g-dev
\
openjdk-8-jdk
\
openjdk-8-jre-headless
\
wget
ENV
ANDROID_NDK_HOME /opt/android-ndk
ENV
ANDROID_NDK /opt/android-ndk
ENV
ANDROID_NDK_VERSION r15c
# Android NDK
# download
RUN
mkdir
/opt/android-ndk-tmp
&&
\
cd
/opt/android-ndk-tmp
&&
\
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
mv ./android-ndk-${ANDROID_NDK_VERSION} ${ANDROID_NDK_HOME} && \
# remove temp dir
cd ${ANDROID_NDK_HOME} && \
rm -rf /opt/android-ndk-tmp
# add to PATH
ENV
PATH ${PATH}:${ANDROID_NDK_HOME}
# Set up Bazel.
# 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.
RUN
echo
"startup --batch"
>>
/etc/bazel.bazelrc
# Similarly, we need to workaround sandboxing issues:
# https://github.com/bazelbuild/bazel/issues/418
RUN
echo
"build --spawn_strategy=standalone --genrule_strategy=standalone"
\
>>
/etc/bazel.bazelrc
# Install the most recent bazel release.
ENV
BAZEL_VERSION 0.7.0
WORKDIR
/
RUN
mkdir
/bazel
&&
\
cd
/bazel
&&
\
curl
-H
"User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36"
-fSsL
-O
https://github.com/bazelbuild/bazel/releases/download/
$BAZEL_VERSION
/bazel-
$BAZEL_VERSION
-installer-linux-x86_64
.sh
&&
\
curl
-H
"User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36"
-fSsL
-o
/bazel/LICENSE.txt https://raw.githubusercontent.com/bazelbuild/bazel/master/LICENSE
&&
\
chmod
+x bazel-
*
.sh
&&
\
./bazel-
$BAZEL_VERSION
-installer-linux-x86_64
.sh
&&
\
cd
/
&&
\
rm
-f
/bazel/bazel-
$BAZEL_VERSION
-installer-linux-x86_64
.sh
# 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
# Install tools
RUN
pip
install
tensorflow
==
1.4.0
&&
\
pip
install
scipy
&&
\
pip
install
jinja2
# Download tensorflow tools
RUN
wget http://cnbj1-inner-fds.api.xiaomi.net/mace/tool/transform_graph
README.md
0 → 100644
浏览文件 @
1b7f0303
# 包含mace环境的docker镜像
========
*
Login in
[
小米容器仓库
](
http://docs.api.xiaomi.net/docker-registry/
)
```
docker login cr.d.xiaomi.net
```
*
使用
`Dockerfile`
编译镜像
```
docker build -t cr.d.xiaomi.net/mace/mace-dev .
```
*
或者从镜像仓库直接pull镜像
```
docker push cr.d.xiaomi.net/mace/mace-dev
```
*
启动容器
```
# Set 'host' network to use ADB
docker run -it --rm -v /local/path:/container/path --net=host cr.d.xiaomi.net/mace/mace-dev /bin/bash
```
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录