Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
Mace
提交
e347f630
Mace
项目概览
慢慢CG
/
Mace
与 Fork 源项目一致
Fork自
Xiaomi / Mace
通知
1
Star
0
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看板
提交
e347f630
编写于
5月 08, 2019
作者:
L
Liangliang He
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix docker build
上级
b1aa90e3
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
36 addition
and
79 deletion
+36
-79
docker/mace-dev-lite/Dockerfile
docker/mace-dev-lite/Dockerfile
+21
-23
docker/mace-dev/Dockerfile
docker/mace-dev/Dockerfile
+9
-50
docker/update_images.sh
docker/update_images.sh
+6
-6
未找到文件。
docker/mace-dev-lite/Dockerfile
浏览文件 @
e347f630
...
@@ -50,8 +50,8 @@ RUN curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/py
...
@@ -50,8 +50,8 @@ RUN curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/py
ENV
PATH /root/.pyenv/bin:/root/.pyenv/shims/:${PATH}
ENV
PATH /root/.pyenv/bin:/root/.pyenv/shims/:${PATH}
RUN
eval
"
$(
pyenv init -
)
"
RUN
eval
"
$(
pyenv init -
)
"
RUN
eval
"
$(
pyenv virtualenv-init -
)
"
RUN
eval
"
$(
pyenv virtualenv-init -
)
"
RUN
pyenv
install
2.7.14
&&
pyenv
install
3.6.3
RUN
pyenv
install
3.6.3
RUN
pyenv global
2.7.14
RUN
pyenv global
3.6.3
# Setup vim
# Setup vim
RUN
apt-get
install
-y
--no-install-recommends
\
RUN
apt-get
install
-y
--no-install-recommends
\
...
@@ -98,46 +98,44 @@ RUN mkdir -p /opt/sdk && \
...
@@ -98,46 +98,44 @@ RUN mkdir -p /opt/sdk && \
yes
| android update sdk
--no-ui
-a
--filter
tools,platform-tools,
${
ANDROID_API_LEVELS
}
,build-tools-
${
ANDROID_BUILD_TOOLS_VERSION
}
yes
| android update sdk
--no-ui
-a
--filter
tools,platform-tools,
${
ANDROID_API_LEVELS
}
,build-tools-
${
ANDROID_BUILD_TOOLS_VERSION
}
RUN ${
ANDROID_HOME
}
/tools/bin/sdkmanager
"cmake;3.6.4111459"
RUN ${
ANDROID_HOME
}
/tools/bin/sdkmanager
"cmake;3.6.4111459"
# Download NDK
# Download NDK
19c
RUN
cd
/opt/
&&
\
RUN
cd
/opt/
&&
\
wget
-q
https://dl.google.com/android/repository/android-ndk-r1
5
c-linux-x86_64.zip
&&
\
wget
-q
https://dl.google.com/android/repository/android-ndk-r1
9
c-linux-x86_64.zip
&&
\
unzip
-q
android-ndk-r1
5
c-linux-x86_64.zip
&&
\
unzip
-q
android-ndk-r1
9
c-linux-x86_64.zip
&&
\
rm
-f
android-ndk-r1
5
c-linux-x86_64.zip
rm
-f
android-ndk-r1
9
c-linux-x86_64.zip
ENV
ANDROID_NDK_VERSION r19c
ENV
ANDROID_NDK_VERSION r19c
ENV
ANDROID_NDK_HOME /opt/android-ndk-${ANDROID_NDK_VERSION}
ENV
ANDROID_NDK_HOME /opt/android-ndk-${ANDROID_NDK_VERSION}
# add to PATH
ENV
PATH ${PATH}:${ANDROID_NDK_HOME}
# Install tools
# Install tools
RUN
apt-get
install
-y
--no-install-recommends
\
RUN
apt-get
install
-y
--no-install-recommends
\
android-tools-adb
android-tools-adb
# fix docker in docker error: `error while loading shared libraries: libltdl.so.7`
# refer to: https://github.com/jenkinsci/docker/issues/506
RUN
apt-get
install
-y
libltdl7
RUN
pip
install
--upgrade
pip
RUN
pip
install
--upgrade
pip
RUN
pip
install
-i
http://mirrors.aliyun.com/pypi/simple/
--trusted-host
mirrors.aliyun.com setuptools
RUN
pip
install
-i
http://mirrors.aliyun.com/pypi/simple/
--trusted-host
mirrors.aliyun.com setuptools
RUN
pip
install
-i
http://mirrors.aliyun.com/pypi/simple/
--trusted-host
mirrors.aliyun.com
\
RUN
pip
install
-i
http://mirrors.aliyun.com/pypi/simple/
--trusted-host
mirrors.aliyun.com
\
numpy
>
=
1.14.0
\
numpy
==
1.15.4
\
scipy
\
scipy
==
1.2.0
\
jinja2
\
Jinja2
==
2.10
\
pyyaml
\
PyYAML
==
3.13
\
sh
==
1.12.14
\
sh
==
1.12.14
\
pycodestyle
==
2.4.0
\
pycodestyle
==
2.4.0
\
filelock
\
filelock
==
3.0.10
\
PTable
PTable
==
0.9.2
# Install Tensorflow
RUN
pip
install
-i
http://mirrors.aliyun.com/pypi/simple/
--trusted-host
mirrors.aliyun.com
\
RUN
pip
install
-i
http://mirrors.aliyun.com/pypi/simple/
--trusted-host
mirrors.aliyun.com
\
tensorflow
==
1.8.0
tensorflow
==
1.8.0
# Install pytorch (refer to: https://pytorch.org/get-started/locally/)
# Install pytorch (refer to: https://pytorch.org/get-started/locally/)
RUN
pip
install
future
==
0.17.1 torchvision_nightly
RUN
pip
install
-i
http://mirrors.aliyun.com/pypi/simple/
--trusted-host
mirrors.aliyun.com
\
RUN
pip
install
torch_nightly
-f
https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
future
==
0.17.1
\
Pillow
==
5.4.1
\
torch
==
1.1.0
\
torchvision
==
0.2.2.post3
# Install ONNX
RUN
pip
install
-i
http://mirrors.aliyun.com/pypi/simple/
--trusted-host
mirrors.aliyun.com
\
RUN
pip
install
-i
http://mirrors.aliyun.com/pypi/simple/
--trusted-host
mirrors.aliyun.com
\
onnx
==
1.3.0
\
onnx
==
1.3.0
\
onnx-tf
==
1.2.0
onnx-tf
==
1.2.0
# fix docker in docker error: `error while loading shared libraries: libltdl.so.7`
# refer to: https://github.com/jenkinsci/docker/issues/506
RUN
apt-get
install
-y
libltdl7
docker/mace-dev/Dockerfile
浏览文件 @
e347f630
...
@@ -9,66 +9,25 @@ RUN apt-get install -y --no-install-recommends \
...
@@ -9,66 +9,25 @@ RUN apt-get install -y --no-install-recommends \
screen
\
screen
\
htop
htop
RUN
pip
install
-i
http://mirrors.aliyun.com/pypi/simple/
--trusted-host
mirrors.aliyun.com
\
sphinx
\
sphinx-autobuild
\
sphinx_rtd_theme
\
recommonmark
# ============ Install same deps for python3 ============
RUN
pyenv global 3.6.3
RUN
pyenv global 3.6.3
# Install tools
RUN
pip
install
-i
http://mirrors.aliyun.com/pypi/simple/
--trusted-host
mirrors.aliyun.com setuptools
RUN
pip
install
-i
http://mirrors.aliyun.com/pypi/simple/
--trusted-host
mirrors.aliyun.com
\
"numpy>=1.14.0"
\
scipy
\
jinja2
\
pyyaml
\
sh
==
1.12.14
\
pycodestyle
==
2.4.0
\
filelock
\
PTable
# Install Tensorflow
RUN
pip
install
-i
http://mirrors.aliyun.com/pypi/simple/
--trusted-host
mirrors.aliyun.com
\
tensorflow
==
1.8.0
# Install pytorch (refer to: https://pytorch.org/get-started/locally/)
RUN
pip
install
future
==
0.17.1 torchvision_nightly
RUN
pip
install
torch_nightly
-f
https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
# Install ONNX
RUN
pip
install
-i
http://mirrors.aliyun.com/pypi/simple/
--trusted-host
mirrors.aliyun.com
\
onnx
==
1.3.0
\
onnx-tf
==
1.2.0
RUN
pip
install
-i
http://mirrors.aliyun.com/pypi/simple/
--trusted-host
mirrors.aliyun.com
\
RUN
pip
install
-i
http://mirrors.aliyun.com/pypi/simple/
--trusted-host
mirrors.aliyun.com
\
sphinx
\
sphinx
\
sphinx-autobuild
\
sphinx-autobuild
\
sphinx_rtd_theme
\
sphinx_rtd_theme
\
recommonmark
recommonmark
RUN
pyenv global 2.7.14
# ============ End installing same deps for python3 ============
# Customize vim
# Customize vim
RUN
mkdir
-p
~/.vim/autoload ~/.vim/bundle
&&
\
RUN
git clone
--recursive
https://github.com/llhe/vimrc.git
&&
\
curl
-LSso
~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
cd
vimrc
&&
\
RUN
mkdir
-p
~/.vim/bundle
rm
-rf
~/.vim
&&
\
RUN
cd
~/.vim/bundle
&&
\
rm
-rf
~/.vimrc
&&
\
git clone https://github.com/scrooloose/nerdtree.git
&&
\
ln
-s
`
pwd
`
/vim ~/.vim
&&
\
git clone https://github.com/vim-syntastic/syntastic.git
&&
\
ln
-s
`
pwd
`
/vimrc ~/.vimrc
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
# Upgrade CMake
RUN
wget https://cmake.org/files/v3.11/cmake-3.11.3-Linux-x86_64.tar.gz
-P
/tmp/
&&
\
RUN
wget
-q
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/
&&
\
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
&&
\
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
rm
-f
/tmp/cmake-3.11.3-Linux-x86_64.tar.gz
...
@@ -106,7 +65,7 @@ RUN cd /opt && \
...
@@ -106,7 +65,7 @@ RUN cd /opt && \
# Mirror of https://cnbj1.fds.api.xiaomi.com/mace/third-party/gcc-linaro/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
# Mirror of https://cnbj1.fds.api.xiaomi.com/mace/third-party/gcc-linaro/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
RUN
cd
/opt
&&
\
RUN
cd
/opt
&&
\
wget
-q
https://releases.linaro.org/components/toolchain/binaries/7.3-2018.05/aarch64-linux-gnu/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
wget
-q
https://releases.linaro.org/components/toolchain/binaries/7.3-2018.05/aarch64-linux-gnu/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
&&
\
tar
xf gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
&&
\
tar
xf gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
&&
\
rm
-rf
gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
rm
-rf
gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
...
...
docker/update_images.sh
浏览文件 @
e347f630
...
@@ -11,15 +11,15 @@ if [ $BUILD_DIR_NAME != $CURRENT_DIR_NAME ]; then
...
@@ -11,15 +11,15 @@ if [ $BUILD_DIR_NAME != $CURRENT_DIR_NAME ]; then
fi
fi
# build images
# build images
docker build
-
t
registry.cn-hangzhou.aliyuncs.com/xiaomimace/mace-dev-lite ./mace-dev-lite
||
exit
1
docker build
-
-network
host
-t
registry.cn-hangzhou.aliyuncs.com/xiaomimace/mace-dev-lite ./mace-dev-lite
docker build
-
t
registry.cn-hangzhou.aliyuncs.com/xiaomimace/mace-dev ./mace-dev-lite
||
exit
1
docker build
-
-network
host
-t
registry.cn-hangzhou.aliyuncs.com/xiaomimace/mace-dev ./mace-dev
docker build
-
t
registry.cn-hangzhou.aliyuncs.com/xiaomimace/gitlab-runner ./gitlab-runner
||
exit
1
docker build
-
-network
host
-t
registry.cn-hangzhou.aliyuncs.com/xiaomimace/gitlab-runner ./gitlab-runner
if
grep
-lq
registry.cn-hangzhou.aliyuncs.com ~/.docker/config.json
;
then
if
grep
-lq
registry.cn-hangzhou.aliyuncs.com ~/.docker/config.json
;
then
# update images to repository
# update images to repository
docker push registry.cn-hangzhou.aliyuncs.com/xiaomimace/mace-dev-lite
||
exit
1
docker push registry.cn-hangzhou.aliyuncs.com/xiaomimace/mace-dev-lite
docker push registry.cn-hangzhou.aliyuncs.com/xiaomimace/mace-dev
||
exit
1
docker push registry.cn-hangzhou.aliyuncs.com/xiaomimace/mace-dev
docker push registry.cn-hangzhou.aliyuncs.com/xiaomimace/gitlab-runner
||
exit
1
docker push registry.cn-hangzhou.aliyuncs.com/xiaomimace/gitlab-runner
else
else
echo
"Login docker registry server is needed!"
echo
"Login docker registry server is needed!"
exit
1
exit
1
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录