Skip to content

Commit

Permalink
Pin base image and remove needless virtualenvs
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Dec 7, 2019
1 parent 344eecd commit 5293f2b
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 170 deletions.
3 changes: 1 addition & 2 deletions dev/tasks/python-wheels/azure.linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ jobs:
set -ex
cd arrow
BUILD_IMAGE=centos-python-{{ wheel_tag }}
# don't attempt to build it, because the base image by pypa is updated
# regularly and would cause undeterministic builds
docker-compose pull $BUILD_IMAGE
docker-compose build $BUILD_IMAGE
docker-compose run \
-e SETUPTOOLS_SCM_PRETEND_VERSION={{ arrow.no_rc_version }} \
-e PYTHON_VERSION="{{ python_version }}" \
Expand Down
8 changes: 4 additions & 4 deletions python/manylinux1/Dockerfile-x86_64_base
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
FROM quay.io/pypa/manylinux1_x86_64:latest

# See https://quay.io/repository/pypa/manylinux1_x86_64?tab=history
# to update base image.
FROM quay.io/pypa/manylinux1_x86_64@sha256:e7ed385da2363ea796385bb106a98364f7a8a658a5e8dbf1b7e4c71f2f299251

# Install dependencies
RUN yum install -y xz ccache flex wget && yum clean all
Expand Down Expand Up @@ -86,9 +89,6 @@ ENV GLOG_HOME /usr
WORKDIR /
RUN git clone https://github.com/matthew-brett/multibuild.git && cd multibuild && git checkout 68a4af043e2adb0d9353d4a0e1f3d871203237aa

ADD scripts/build_virtualenvs.sh /
RUN /build_virtualenvs.sh

ADD scripts/build_llvm.sh /
RUN /build_llvm.sh

Expand Down
3 changes: 0 additions & 3 deletions python/manylinux1/Dockerfile-x86_64_ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ RUN /install_cmake.sh
WORKDIR /
RUN git clone https://github.com/matthew-brett/multibuild.git && cd multibuild && git checkout 68a4af043e2adb0d9353d4a0e1f3d871203237aa

ADD scripts/build_virtualenvs.sh /
RUN /build_virtualenvs.sh

ADD scripts/build_openssl.sh /
RUN /build_openssl.sh

Expand Down
8 changes: 4 additions & 4 deletions python/manylinux1/build_arrow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,17 @@ export PYARROW_CMAKE_OPTIONS='-DTHRIFT_HOME=/usr -DBoost_NAMESPACE=arrow_boost -
mkdir -p /io/dist

# Must pass PYTHON_VERSION and UNICODE_WIDTH env variables
# possible values are: 2.7,16 2.7,32 3.5,16 3.6,16 3.7,16
# possible values are: 2.7,16 2.7,32 3.5,16 3.6,16 3.7,16 3.8,16

CPYTHON_PATH="$(cpython_path ${PYTHON_VERSION} ${UNICODE_WIDTH})"
PYTHON_INTERPRETER="${CPYTHON_PATH}/bin/python"
PIP="${CPYTHON_PATH}/bin/pip"
# Put our Python first to avoid picking up an antiquated Python from CMake
PATH="${CPYTHON_PATH}/bin:${PATH}"

echo "=== (${PYTHON_VERSION}) Install the wheel build dependencies ==="
$PIP install -r requirements-wheel.txt

if [ "${PYTHON_VERSION}" != "2.7" ]; then
export PYARROW_WITH_FLIGHT=1
export PYARROW_WITH_GANDIVA=1
Expand Down Expand Up @@ -123,9 +126,6 @@ popd
# Check that we don't expose any unwanted symbols
/io/scripts/check_arrow_visibility.sh

echo "=== (${PYTHON_VERSION}) Install the wheel build dependencies ==="
$PIP install -r requirements-wheel.txt

# Clear output directories and leftovers
rm -rf dist/
rm -rf build/
Expand Down
73 changes: 0 additions & 73 deletions python/manylinux1/scripts/build_virtualenvs.sh

This file was deleted.

7 changes: 3 additions & 4 deletions python/manylinux2010/Dockerfile-x86_64_base
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
# specific language governing permissions and limitations
# under the License.

FROM quay.io/pypa/manylinux2010_x86_64:latest
# See https://quay.io/repository/pypa/manylinux2010_x86_64?tab=history
# to update base image.
FROM quay.io/pypa/manylinux2010_x86_64@sha256:d41631c7360a0028876755aebb7036db639c24e7dcdaf3a9e6dcc0e74a681541

# Install build dependencies
RUN yum install -y xz bison ccache flex wget
Expand Down Expand Up @@ -94,6 +96,3 @@ RUN /build_re2.sh

ADD scripts/build_bz2.sh /
RUN /build_bz2.sh

ADD scripts/build_virtualenvs.sh /
RUN /build_virtualenvs.sh
8 changes: 4 additions & 4 deletions python/manylinux2010/build_arrow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,16 @@ export PYARROW_CMAKE_OPTIONS='-DBoost_NAMESPACE=arrow_boost -DBOOST_ROOT=/arrow_
mkdir -p /io/dist

# Must pass PYTHON_VERSION and UNICODE_WIDTH env variables
# possible values are: 2.7,16 2.7,32 3.5,16 3.6,16 3.7,16
# possible values are: 2.7,16 2.7,32 3.5,16 3.6,16 3.7,16 3.8,16

CPYTHON_PATH="$(cpython_path ${PYTHON_VERSION} ${UNICODE_WIDTH})"
PYTHON_INTERPRETER="${CPYTHON_PATH}/bin/python"
PIP="${CPYTHON_PATH}/bin/pip"
PATH="${PATH}:${CPYTHON_PATH}"

echo "=== (${PYTHON_VERSION}) Install the wheel build dependencies ==="
$PIP install -r requirements-wheel.txt

if [ "${PYTHON_VERSION}" != "2.7" ]; then
export PYARROW_WITH_FLIGHT=1
export PYARROW_WITH_GANDIVA=1
Expand Down Expand Up @@ -123,9 +126,6 @@ popd
# Check that we don't expose any unwanted symbols
/io/scripts/check_arrow_visibility.sh

echo "=== (${PYTHON_VERSION}) Install the wheel build dependencies ==="
$PIP install -r requirements-wheel.txt

# Clear output directories and leftovers
rm -rf dist/
rm -rf build/
Expand Down
73 changes: 0 additions & 73 deletions python/manylinux2010/scripts/build_virtualenvs.sh

This file was deleted.

10 changes: 7 additions & 3 deletions python/requirements-wheel.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Keras-Preprocessing
cython
wheel==0.31.1
futures; python_version < "3.2"
numpy>=1.16
pandas
setuptools_scm==3.2.0
six>=1.0.0
numpy>=1.16
futures; python_version < "3.2"
# TODO: TensorFlow doesn't support Python 3.8 yet.
tensorflow; python_version < "3.8"
wheel==0.31.1

0 comments on commit 5293f2b

Please sign in to comment.