Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
f1928000
P
Paddle
项目概览
Crayon鑫
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
f1928000
编写于
4月 24, 2017
作者:
R
reyoung
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Refine Docker build
上级
b3c6cd03
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
12 addition
and
27 deletion
+12
-27
cmake/package.cmake
cmake/package.cmake
+1
-1
paddle/scripts/deb/postinst
paddle/scripts/deb/postinst
+6
-0
paddle/scripts/docker/build.sh
paddle/scripts/docker/build.sh
+3
-25
python/setup.py.in
python/setup.py.in
+2
-1
未找到文件。
cmake/package.cmake
浏览文件 @
f1928000
set
(
CPACK_PACKAGE_NAME paddle
)
set
(
CPACK_PACKAGE_DESCRIPTION_SUMMARY
""
)
set
(
CPACK_PACKAGE_VERSION_MAJOR
${
PADDLE_MAJOR_VERSION
}
)
set
(
CPACK_PACKAGE_VERSION_MINOR
${
PADDLE_MINOR_VERSION
}
)
set
(
CPACK_PACKAGE_VERSION_PATCH
${
PADDLE_PATCH_VERSION
}
)
...
...
@@ -12,6 +11,7 @@ set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Paddle")
set
(
CPACK_PACKAGE_DESCRIPTION
""
)
set
(
CPACK_DEBIAN_PACKAGE_DEPENDS
"libpython2.7, libstdc++6, python-pip, curl, libgfortran3, python-pip-whl"
)
set
(
CPACK_DEBIAN_PACKAGE_SECTION Devel
)
set
(
CPACK_DEBIAN_PACKAGE_VERSION
${
PADDLE_VERSION
}
)
set
(
CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
"
${
PROJ_ROOT
}
/paddle/scripts/deb/postinst"
)
#set(CPACK_GENERATOR "DEB")
# Start cpack
...
...
paddle/scripts/deb/postinst
0 → 100644
浏览文件 @
f1928000
#!/bin/bash
set
-e
echo
"Post install paddle debian package."
echo
"Install some python package used for paddle. You can run "
echo
" pip install /usr/opt/paddle/share/wheels/*.whl to install them."
find /usr/
-name
'*paddle*.whl'
| xargs pip
install
paddle/scripts/docker/build.sh
浏览文件 @
f1928000
...
...
@@ -5,13 +5,8 @@ set -e
# Set BASE_IMAGE according to env variables
if
[
${
WITH_GPU
}
==
"ON"
]
;
then
BASE_IMAGE
=
"nvidia/cuda:8.0-cudnn5-runtime-ubuntu14.04"
# additional packages to install when building gpu images
GPU_DOCKER_PKG
=
"python-pip python-dev"
else
BASE_IMAGE
=
"python:2.7.13-slim"
# FIXME: python base image uses different python version than WITH_GPU
# need to change PYTHONHOME to /usr/local when using python base image
CPU_DOCKER_PYTHON_HOME_ENV
=
"ENV PYTHONHOME /usr/local"
BASE_IMAGE
=
"ubuntu:14.04"
fi
DOCKERFILE_GPU_ENV
=
""
...
...
@@ -88,12 +83,6 @@ fi
paddle version
if
[[
-n
${
APT_MIRROR
}
]]
;
then
MIRROR_UPDATE
=
"sed -i '
${
APT_MIRROR
}
' /etc/apt/sources.list"
else
MIRROR_UPDATE
=
""
fi
cat
>
/paddle/build/Dockerfile
<<
EOF
FROM
${
BASE_IMAGE
}
MAINTAINER PaddlePaddle Authors <paddle-dev@baidu.com>
...
...
@@ -102,23 +91,13 @@ ENV LANG en_US.UTF-8
# Use Fix locales to en_US.UTF-8
EOF
if
[[
-n
${
MIRROR_UPDATE
}
]]
;
then
cat
>>
/paddle/build/Dockerfile
<<
EOF
RUN
${
MIRROR_UPDATE
}
EOF
fi
if
[[
-n
${
GPU_DOCKER_PKG
}
]]
;
then
if
[[
-n
${
APT_MIRROR
}
]]
;
then
cat
>>
/paddle/build/Dockerfile
<<
EOF
RUN apt-get update &&
\
apt-get install -y
${
GPU_DOCKER_PKG
}
&&
\
apt-get clean -y
RUN sed -i '
${
APT_MIRROR
}
' /etc/apt/sources.list
EOF
fi
cat
>>
/paddle/build/Dockerfile
<<
EOF
RUN pip install --upgrade pip
# Use different deb file when building different type of images
ADD build/*.deb /
# run paddle version to install python packages first
...
...
@@ -127,7 +106,6 @@ RUN apt-get update &&\
apt-get clean -y &&
\
rm -f /*.deb &&
\
paddle version
${
CPU_DOCKER_PYTHON_HOME_ENV
}
${
DOCKERFILE_CUDNN_DSO
}
${
DOCKERFILE_GPU_ENV
}
# default command shows the paddle version and exit
...
...
python/setup.py.in
浏览文件 @
f1928000
...
...
@@ -16,7 +16,8 @@ setup(name='paddle',
packages=packages,
install_requires=[
"numpy",
"protobuf==3.1.0"
"protobuf==3.1.0",
"matplotlib",
],
package_dir={
'': '${CMAKE_CURRENT_SOURCE_DIR}'
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录