提交 0b4d4560 编写于 作者: Y yi.wu

add python requests, add DELETE_BUILD_CACHE arg

上级 653c981d
...@@ -25,7 +25,7 @@ else ...@@ -25,7 +25,7 @@ else
BASE_IMAGE="python:2.7.13-slim" BASE_IMAGE="python:2.7.13-slim"
if [ ${WITH_AVX} == "ON" ]; then if [ ${WITH_AVX} == "ON" ]; then
DEB_PATH="dist/cpu/" DEB_PATH="dist/cpu/"
DOCKER_SUFFIX="" DOCKER_SUFFIX="cpu"
else else
DEB_PATH="dist/cpu-noavx/" DEB_PATH="dist/cpu-noavx/"
DOCKER_SUFFIX="noavx" DOCKER_SUFFIX="noavx"
...@@ -40,8 +40,11 @@ if [[ ${BUILD_AND_INSTALL:-OFF} == 'ON' ]]; then ...@@ -40,8 +40,11 @@ if [[ ${BUILD_AND_INSTALL:-OFF} == 'ON' ]]; then
fi fi
mkdir -p /paddle/build # -p means no error if exists mkdir -p /paddle/build # -p means no error if exists
cd /paddle/build
# clean local cmake and third_party cache # clean local cmake and third_party cache
cd /paddle/build && rm -rf * && rm -rf ../third_party if [ ${DELETE_BUILD_CACHE} == 'ON' ]; then
rm -rf * && rm -rf ../third_party
fi
cmake .. \ cmake .. \
-DWITH_DOC=${WITH_DOC:-OFF} \ -DWITH_DOC=${WITH_DOC:-OFF} \
-DWITH_GPU=${WITH_GPU:-OFF} \ -DWITH_GPU=${WITH_GPU:-OFF} \
...@@ -54,7 +57,9 @@ if [[ ${BUILD_AND_INSTALL:-OFF} == 'ON' ]]; then ...@@ -54,7 +57,9 @@ if [[ ${BUILD_AND_INSTALL:-OFF} == 'ON' ]]; then
make install make install
# generate deb package for current build # generate deb package for current build
# FIXME(typhoonzero): should we remove paddle/scripts/deb ? # FIXME(typhoonzero): should we remove paddle/scripts/deb ?
cpack -D CPACK_GENERATOR='DEB' .. # FIXME: CPACK_DEBIAN_PACKAGE_DEPENDS removes all dev dependencies, must
# install them in docker
cpack -D CPACK_GENERATOR='DEB' -D CPACK_DEBIAN_PACKAGE_DEPENDS="" ..
mv /paddle/build/*.deb /paddle/${DEB_PATH} mv /paddle/build/*.deb /paddle/${DEB_PATH}
if [[ ${BUILD_WOBOQ:-OFF} == 'ON' ]]; then if [[ ${BUILD_WOBOQ:-OFF} == 'ON' ]]; then
...@@ -123,7 +128,7 @@ RUN ${MIRROR_UPDATE} ...@@ -123,7 +128,7 @@ RUN ${MIRROR_UPDATE}
apt-get install -y libgfortran3 && \ apt-get install -y libgfortran3 && \
apt-get clean -y && \ apt-get clean -y && \
pip install --upgrade pip && \ pip install --upgrade pip && \
pip install -U 'protobuf==3.1.0' pip install -U 'protobuf==3.1.0' requests
RUN pip install numpy RUN pip install numpy
# Use different deb file when building different type of images # Use different deb file when building different type of images
ADD \$PWD/${DEB_PATH}*.deb /usr/local/opt/paddle/deb/ ADD \$PWD/${DEB_PATH}*.deb /usr/local/opt/paddle/deb/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册