This is an automated email from the ASF dual-hosted git repository.

wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new 45ad0b0  ARROW-2087: [Python] Binaries of 3rdparty are not stripped in 
manylinux1 base image
45ad0b0 is described below

commit 45ad0b079d152b52162bd29a5cd9adecf3d37a4b
Author: Korn, Uwe <[email protected]>
AuthorDate: Wed Feb 7 15:35:12 2018 -0500

    ARROW-2087: [Python] Binaries of 3rdparty are not stripped in manylinux1 
base image
    
    This brings the size of the docker container down to 2.19G
    
    Author: Korn, Uwe <[email protected]>
    
    Closes #1564 from xhochy/ARROW-2087 and squashes the following commits:
    
    ad8c16fa [Korn, Uwe] ARROW-2087: [Python] Binaries of 3rdparty are not 
stripped in manylinux1 base image
---
 python/manylinux1/Dockerfile-x86_64            |  2 +-
 python/manylinux1/Dockerfile-x86_64_base       | 11 +++--------
 python/manylinux1/scripts/build_virtualenvs.sh | 14 +++++++++++---
 python/manylinux1/scripts/install_cmake.sh     | 22 ++++++++++++++++++++++
 4 files changed, 37 insertions(+), 12 deletions(-)

diff --git a/python/manylinux1/Dockerfile-x86_64 
b/python/manylinux1/Dockerfile-x86_64
index 98b5595..1ade9ab 100644
--- a/python/manylinux1/Dockerfile-x86_64
+++ b/python/manylinux1/Dockerfile-x86_64
@@ -14,7 +14,7 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-FROM quay.io/xhochy/arrow_manylinux1_x86_64_base:ARROW-2086
+FROM quay.io/xhochy/arrow_manylinux1_x86_64_base:ARROW-2087
 
 ADD arrow /arrow
 WORKDIR /arrow/cpp
diff --git a/python/manylinux1/Dockerfile-x86_64_base 
b/python/manylinux1/Dockerfile-x86_64_base
index b768753..1f15f77 100644
--- a/python/manylinux1/Dockerfile-x86_64_base
+++ b/python/manylinux1/Dockerfile-x86_64_base
@@ -28,11 +28,9 @@ RUN /build_boost.sh
 ADD scripts/build_jemalloc.sh /
 RUN /build_jemalloc.sh
 
-WORKDIR /
 # Install cmake manylinux1 package
-RUN /opt/python/cp35-cp35m/bin/pip install cmake ninja
-RUN ln -s /opt/python/cp35-cp35m/bin/cmake /usr/bin/cmake
-RUN ln -s /opt/python/cp35-cp35m/bin/ninja /usr/bin/ninja
+ADD scripts/install_cmake.sh /
+RUN /install_cmake.sh
 
 ADD scripts/build_gtest.sh /
 RUN /build_gtest.sh
@@ -69,10 +67,7 @@ ADD scripts/build_ccache.sh /
 RUN /build_ccache.sh
 
 WORKDIR /
-RUN git clone https://github.com/matthew-brett/multibuild.git
-WORKDIR /multibuild
-RUN git checkout ffe59955ad8690c2f8bb74766cb7e9b0d0ee3963
-WORKDIR /
+RUN git clone https://github.com/matthew-brett/multibuild.git && cd multibuild 
&& git checkout ffe59955ad8690c2f8bb74766cb7e9b0d0ee3963
 
 ADD scripts/build_virtualenvs.sh /
 RUN /build_virtualenvs.sh
diff --git a/python/manylinux1/scripts/build_virtualenvs.sh 
b/python/manylinux1/scripts/build_virtualenvs.sh
index e641570..b548611 100755
--- a/python/manylinux1/scripts/build_virtualenvs.sh
+++ b/python/manylinux1/scripts/build_virtualenvs.sh
@@ -33,18 +33,26 @@ for PYTHON in ${PYTHON_VERSIONS}; do
     PATH="$PATH:$(cpython_path $PYTHON)"
 
     echo "=== (${PYTHON}) Installing build dependencies ==="
-    $PIPI_IO "numpy==1.10.1"
+    $PIPI_IO "numpy==1.10.4"
     $PIPI_IO "cython==0.25.2"
-    $PIPI_IO "pandas==0.20.1"
+    $PIPI_IO "pandas==0.20.3"
     $PIPI_IO "virtualenv==15.1.0"
 
     echo "=== (${PYTHON}) Preparing virtualenv for tests ==="
     "$(cpython_path $PYTHON)/bin/virtualenv" -p ${PYTHON_INTERPRETER} 
--no-download /venv-test-${PYTHON}
     source /venv-test-${PYTHON}/bin/activate
-    pip install pytest 'numpy==1.12.1' 'pandas==0.20.1'
+    pip install pytest 'numpy==1.14.0' 'pandas==0.20.3'
     deactivate
 done
 
+# Remove debug symbols from libraries that were installed via wheel.
+find /venv-test-*/lib/*/site-packages/pandas -name '*.so' -exec strip '{}' ';'
+find /venv-test-*/lib/*/site-packages/numpy -name '*.so' -exec strip '{}' ';'
+find /opt/_internal/cpython-*/lib/*/site-packages/pandas -name '*.so' -exec 
strip '{}' ';'
+# Only Python 3.6 packages are stripable as they are built inside of the image 
+find /opt/_internal/cpython-3.6.4/lib/python3.6/site-packages/numpy -name 
'*.so' -exec strip '{}' ';'
+find /opt/_internal/*/lib/*/site-packages/Cython -name '*.so' -exec strip '{}' 
';'
+
 # Remove pip cache again. It's useful during the virtualenv creation but we
 # don't want it persisted in the docker layer, ~264MiB
 rm -rf /root/.cache
diff --git a/python/manylinux1/scripts/install_cmake.sh 
b/python/manylinux1/scripts/install_cmake.sh
new file mode 100755
index 0000000..8643485
--- /dev/null
+++ b/python/manylinux1/scripts/install_cmake.sh
@@ -0,0 +1,22 @@
+#!/bin/bash -e
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+/opt/python/cp35-cp35m/bin/pip install cmake ninja
+ln -s /opt/python/cp35-cp35m/bin/cmake /usr/bin/cmake
+ln -s /opt/python/cp35-cp35m/bin/ninja /usr/bin/ninja
+strip /opt/_internal/cpython-3.5.4/lib/python3.5/site-packages/cmake/data/bin/*

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to