From 5f41d2814bb951e662e009f6e394e0ee5ff2cc08 Mon Sep 17 00:00:00 2001 From: reyoung Date: Mon, 24 Apr 2017 15:24:52 +0800 Subject: [PATCH] Make docker build use deb package. --- cmake/package.cmake | 2 +- paddle/scripts/docker/build.sh | 41 +++++++++++++++++++++------------- python/setup.py.in | 4 ++++ 3 files changed, 31 insertions(+), 16 deletions(-) diff --git a/cmake/package.cmake b/cmake/package.cmake index 6f3a50b6c6..06c0910f0e 100644 --- a/cmake/package.cmake +++ b/cmake/package.cmake @@ -10,7 +10,7 @@ set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE amd64) set(CPACK_DEBIAN_PACKAGE_MAINTAINER PaddlePaddle Dev ) set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Paddle") set(CPACK_PACKAGE_DESCRIPTION "") -set(CPACK_DEBIAN_PACKAGE_DEPENDS "libpython2.7, libstdc++6, python-pip, curl") +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_CONTROL_EXTRA "${PROJ_ROOT}/paddle/scripts/deb/postinst") #set(CPACK_GENERATOR "DEB") diff --git a/paddle/scripts/docker/build.sh b/paddle/scripts/docker/build.sh index 48e8e912b8..c17578b14e 100644 --- a/paddle/scripts/docker/build.sh +++ b/paddle/scripts/docker/build.sh @@ -44,10 +44,7 @@ fi make install # generate deb package for current build -# FIXME(typhoonzero): should we remove paddle/scripts/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="" .. +cpack -D CPACK_GENERATOR='DEB' .. if [[ ${WOBOQ:-OFF} == 'ON' ]]; then apt-get install -y clang-3.8 llvm-3.8 libclang-3.8-dev @@ -76,9 +73,9 @@ fi paddle version if [[ -n ${APT_MIRROR} ]]; then - MIRROR_UPDATE="sed -i '${APT_MIRROR}' /etc/apt/sources.list && \\" + MIRROR_UPDATE="sed -i '${APT_MIRROR}' /etc/apt/sources.list" else - MIRROR_UPDATE="\\" + MIRROR_UPDATE="" fi cat > /paddle/build/Dockerfile < ENV HOME /root ENV LANG en_US.UTF-8 # Use Fix locales to en_US.UTF-8 +EOF + +if [[ -n ${MIRROR_UPDATE} ]]; then +cat >> /paddle/build/Dockerfile <> /paddle/build/Dockerfile <> /paddle/build/Dockerfile <