Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
aca08255
P
PaddleDetection
项目概览
s920243400
/
PaddleDetection
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleDetection
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
aca08255
编写于
11月 25, 2016
作者:
Y
Yi Wang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Allow docker build to build from local Git commit.
上级
4f1bf30d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
53 addition
and
87 deletion
+53
-87
paddle/scripts/docker/Dockerfile.m4
paddle/scripts/docker/Dockerfile.m4
+32
-8
paddle/scripts/docker/build.sh
paddle/scripts/docker/build.sh
+9
-31
paddle/scripts/docker/generate.sh
paddle/scripts/docker/generate.sh
+12
-48
未找到文件。
paddle/scripts/docker/Dockerfile.m4
浏览文件 @
aca08255
FROM PADDLE_BASE_IMAGE
FROM PADDLE_BASE_IMAGE
MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com>
MAINTAINER PaddlePaddle Dev Team <paddle-dev@baidu.com>
COPY build.sh /root/
ENV GIT_CHECKOUT=v0.9.0a0
# It is good to run apt-get install with Dockerfile RUN directive,
# because if the following invocation to /root/build.sh fails, `docker
# build` wouldn't have to re-install packages after we fix
# /root/build.sh.
RUN apt-get update && \
apt-get install -y cmake libprotobuf-dev protobuf-compiler git \
libgoogle-glog-dev libgflags-dev libatlas-dev libatlas3-base g++ m4 python-pip \
python-protobuf python-numpy python-dev swig openssh-server \
wget unzip python-matplotlib tar xz-utils bzip2 gzip coreutils \
sed grep graphviz libjpeg-dev zlib1g-dev doxygen && \
apt-get clean -y
RUN pip install BeautifulSoup docopt PyYAML pillow \
'sphinx>=1.4.0' sphinx_rtd_theme breathe recommonmark
ENV WITH_GPU=PADDLE_WITH_GPU
ENV WITH_GPU=PADDLE_WITH_GPU
ENV IS_DEVEL=PADDLE_IS_DEVEL
ENV WITH_DEMO=PADDLE_WITH_DEMO
ENV PIP_INSTALL_ARGS ""
ENV PIP_GENERAL_ARGS ""
ENV USE_UBUNTU_MIRROR OFF
ENV WITH_AVX=PADDLE_WITH_AVX
ENV WITH_AVX=PADDLE_WITH_AVX
RUN cd /root/ && bash build.sh
RUN mkdir /paddle
COPY . /paddle/
COPY paddle/scripts/docker/build.sh /root/
RUN /root/build.sh
RUN echo 'export LD_LIBRARY_PATH=/usr/lib64:${LD_LIBRARY_PATH}' >> /etc/profile
RUN pip install /usr/local/opt/paddle/share/wheels/*.whl
RUN paddle version # print version after build
# Configure OpenSSH server. c.f. https://docs.docker.com/engine/examples/running_ssh_service
RUN mkdir /var/run/sshd
RUN echo 'root:root' | chpasswd
RUN sed -ri 's/^PermitRootLogin\s+.*/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -ri 's/UsePAM yes/#UsePAM yes/g' /etc/ssh/sshd_config
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]
paddle/scripts/docker/build.sh
100644 → 100755
浏览文件 @
aca08255
...
@@ -7,43 +7,21 @@ function abort(){
...
@@ -7,43 +7,21 @@ function abort(){
trap
'abort'
0
trap
'abort'
0
set
-e
set
-e
if
[
${
USE_UBUNTU_MIRROR
}
==
"ON"
]
;
then
sed
-i
's#http://archive\.ubuntu\.com/ubuntu/#mirror://mirrors\.ubuntu\.com/mirrors\.txt#g'
\
/etc/apt/sources.list
fi
apt-get update
apt-get
install
-y
cmake libprotobuf-dev protobuf-compiler git
\
libgoogle-glog-dev libgflags-dev libatlas-dev libatlas3-base g++ m4 python-pip
\
python-protobuf python-numpy python-dev swig
if
[
${
WITH_GPU
}
==
'ON'
]
;
then
if
[
${
WITH_GPU
}
==
'ON'
]
;
then
ln
-s
/usr/lib/x86_64-linux-gnu/libcudnn.so /usr/lib/libcudnn.so
ln
-s
/usr/lib/x86_64-linux-gnu/libcudnn.so /usr/lib/libcudnn.so
fi
fi
cd
~
mkdir
-p
/paddle/build
# -p means no error if exists
git clone https://github.com/baidu/Paddle.git paddle
cd
/paddle/build
cd
paddle
cmake ..
\
git checkout
${
GIT_CHECKOUT
}
-DWITH_DOC
=
ON
\
mkdir
build
-DWITH_GPU
=
${
WITH_GPU
}
\
cd
build
-DWITH_AVX
=
${
WITH_AVX
}
\
cmake ..
-DWITH_DOC
=
OFF
-DWITH_GPU
=
${
WITH_GPU
}
-DWITH_SWIG_PY
=
ON
\
-DWITH_SWIG_PY
=
ON
\
-DCUDNN_ROOT
=
/usr/
-DWITH_STYLE_CHECK
=
OFF
-DWITH_AVX
=
${
WITH_AVX
}
-DCUDNN_ROOT
=
/usr/
\
-DWITH_STYLE_CHECK
=
OFF
make
-j
`
nproc
`
make
-j
`
nproc
`
# because durning make install, there are several warning, so set +e, do not cause abort
make
install
make
install
echo
'export LD_LIBRARY_PATH=/usr/lib64:${LD_LIBRARY_PATH}'
>>
/etc/profile
pip
${
PIP_GENERAL_ARGS
}
install
${
PIP_INSTALL_ARGS
}
/usr/local/opt/paddle/share/wheels/
*
.whl
paddle version
# print version after build
if
[
${
WITH_DEMO
}
==
"ON"
]
;
then
apt-get
install
-y
wget unzip perl python-matplotlib
tar
xz-utils bzip2
gzip
coreutils
\
sed grep
graphviz libjpeg-dev zlib1g-dev
pip
${
PIP_GENERAL_ARGS
}
install
${
PIP_INSTALL_ARGS
}
BeautifulSoup docopt
\
PyYAML pillow
fi
if
[
${
IS_DEVEL
}
==
"OFF"
]
;
then
# clean build packages.
cd
~
rm
-rf
paddle
fi
apt-get clean
-y
trap
: 0
trap
: 0
paddle/scripts/docker/generate.sh
100644 → 100755
浏览文件 @
aca08255
#!/bin/bash
#!/bin/bash
set
-e
set
-e
cd
`
dirname
$0
`
cd
`
dirname
$0
`
m4
-DPADDLE_WITH_GPU
=
OFF
-DPADDLE_IS_DEVEL
=
OFF
-DPADDLE_WITH_DEMO
=
OFF
\
-DPADDLE_BASE_IMAGE
=
ubuntu:14.04
-DPADDLE_WITH_AVX
=
ON
\
m4
-DPADDLE_WITH_GPU
=
OFF
\
-DPADDLE_WITH_AVX
=
ON
\
-DPADDLE_BASE_IMAGE
=
ubuntu:14.04
\
Dockerfile.m4
>
Dockerfile.cpu
Dockerfile.m4
>
Dockerfile.cpu
m4
-DPADDLE_WITH_GPU
=
OFF
-DPADDLE_IS_DEVEL
=
OFF
-DPADDLE_WITH_DEMO
=
OFF
\
m4
-DPADDLE_WITH_GPU
=
OFF
\
-DPADDLE_BASE_IMAGE
=
ubuntu:14.04
-DPADDLE_WITH_AVX
=
OFF
\
-DPADDLE_WITH_AVX
=
OFF
\
-DPADDLE_BASE_IMAGE
=
ubuntu:14.04
\
Dockerfile.m4
>
Dockerfile.cpu-noavx
Dockerfile.m4
>
Dockerfile.cpu-noavx
m4
-DPADDLE_WITH_GPU
=
OFF
-DPADDLE_IS_DEVEL
=
ON
-DPADDLE_WITH_DEMO
=
OFF
\
m4
-DPADDLE_WITH_GPU
=
ON
\
-DPADDLE_BASE_IMAGE
=
ubuntu:14.04
-DPADDLE_WITH_AVX
=
OFF
\
Dockerfile.m4
>
Dockerfile.cpu-noavx-devel
m4
-DPADDLE_WITH_GPU
=
OFF
-DPADDLE_IS_DEVEL
=
ON
-DPADDLE_WITH_DEMO
=
OFF
\
-DPADDLE_BASE_IMAGE
=
ubuntu:14.04
-DPADDLE_WITH_AVX
=
ON
\
Dockerfile.m4
>
Dockerfile.cpu-devel
m4
-DPADDLE_WITH_GPU
=
OFF
-DPADDLE_IS_DEVEL
=
ON
-DPADDLE_WITH_DEMO
=
ON
\
-DPADDLE_BASE_IMAGE
=
ubuntu:14.04
-DPADDLE_WITH_AVX
=
ON
\
Dockerfile.m4
>
Dockerfile.cpu-demo
m4
-DPADDLE_WITH_GPU
=
OFF
-DPADDLE_IS_DEVEL
=
ON
-DPADDLE_WITH_DEMO
=
ON
\
-DPADDLE_BASE_IMAGE
=
ubuntu:14.04
-DPADDLE_WITH_AVX
=
OFF
\
Dockerfile.m4
>
Dockerfile.cpu-noavx-demo
m4
-DPADDLE_WITH_GPU
=
ON
-DPADDLE_IS_DEVEL
=
OFF
-DPADDLE_WITH_DEMO
=
OFF
\
-DPADDLE_BASE_IMAGE
=
nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04
\
-DPADDLE_WITH_AVX
=
ON
\
-DPADDLE_WITH_AVX
=
ON
\
Dockerfile.m4
>
Dockerfile.gpu
m4
-DPADDLE_WITH_GPU
=
ON
-DPADDLE_IS_DEVEL
=
OFF
-DPADDLE_WITH_DEMO
=
OFF
\
-DPADDLE_BASE_IMAGE
=
nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04
\
-DPADDLE_BASE_IMAGE
=
nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04
\
-DPADDLE_WITH_AVX
=
OFF
\
Dockerfile.m4
>
Dockerfile.gpu
Dockerfile.m4
>
Dockerfile.gpu-noavx
m4
-DPADDLE_WITH_GPU
=
ON
-DPADDLE_IS_DEVEL
=
ON
-DPADDLE_WITH_DEMO
=
OFF
\
-DPADDLE_BASE_IMAGE
=
nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04
\
-DPADDLE_WITH_AVX
=
ON
\
Dockerfile.m4
>
Dockerfile.gpu-devel
m4
-DPADDLE_WITH_GPU
=
ON
-DPADDLE_IS_DEVEL
=
ON
-DPADDLE_WITH_DEMO
=
OFF
\
m4
-DPADDLE_WITH_GPU
=
ON
\
-DPADDLE_BASE_IMAGE
=
nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04
\
-DPADDLE_WITH_AVX
=
OFF
\
-DPADDLE_WITH_AVX
=
OFF
\
Dockerfile.m4
>
Dockerfile.gpu-noavx-devel
m4
-DPADDLE_WITH_GPU
=
ON
-DPADDLE_IS_DEVEL
=
ON
-DPADDLE_WITH_DEMO
=
ON
\
-DPADDLE_BASE_IMAGE
=
nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04
\
-DPADDLE_BASE_IMAGE
=
nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04
\
-DPADDLE_WITH_AVX
=
ON
\
Dockerfile.m4
>
Dockerfile.gpu-noavx
Dockerfile.m4
>
Dockerfile.gpu-demo
m4
-DPADDLE_WITH_GPU
=
ON
-DPADDLE_IS_DEVEL
=
ON
-DPADDLE_WITH_DEMO
=
ON
\
-DPADDLE_BASE_IMAGE
=
nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04
\
-DPADDLE_WITH_AVX
=
OFF
\
Dockerfile.m4
>
Dockerfile.gpu-noavx-demo
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录