kou commented on code in PR #45470: URL: https://github.com/apache/arrow/pull/45470#discussion_r1958874770
########## ci/docker/python-wheel-musllinux.dockerfile: ########## @@ -0,0 +1,106 @@ +# 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. + +ARG base +FROM ${base} + +ARG arch +ARG arch_short +ARG musllinux + +ENV LINUX_WHEEL_NAME='musl' +ENV LINUX_WHEEL_VERSION=${musllinux} + +RUN apk update +RUN apk add --no-cache build-base cmake flex wget zip ninja ccache Review Comment: ```suggestion RUN apk add --no-cache build-base ccache cmake flex ninja wget zip ``` ########## ci/docker/python-wheel-musllinux-test.dockerfile: ########## @@ -0,0 +1,35 @@ +# 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. + +ARG alpine_linux +ARG python_image_tag +FROM python:${python_image_tag}-alpine${alpine_linux} + +RUN apk add --no-cache python3-dev g++ bash linux-headers tzdata Review Comment: Could you sort package list? ```suggestion RUN apk add --no-cache bash g++ linux-headers python3-dev tzdata ``` ########## docker-compose.yml: ########## @@ -882,6 +888,32 @@ services: ############################### Python ###################################### + alpine-linux-python: + # Usage: + # docker compose build alpine-linux-cpp + # docker compose build alpine-linux-python + # docker compose run --rm alpine-python + # Parameters: + # ALPINE_LINUX: 3.18 + # ARCH: amd64, arm64v8, ... + image: ${REPO}:${ARCH}-alpine-linux-${ALPINE_LINUX}-python-3 + build: + context: . + dockerfile: ci/docker/linux-apt-python-3.dockerfile + cache_from: + - ${REPO}:${ARCH}-alpine-linux-${ALPINE_LINUX}-python-3 + args: + base: ${REPO}:${ARCH}-alpine-linux-${ALPINE_LINUX}-cpp + shm_size: *shm-size + environment: + <<: [ *common, *ccache ] + volumes: *alpine-linux-volumes + command: &python-command > + /bin/bash -c " + /arrow/ci/scripts/cpp_build.sh /arrow /build && + /arrow/ci/scripts/python_build.sh /arrow /build && + /arrow/ci/scripts/python_test.sh /arrow" + Review Comment: Can we remove this? We don't need this for musllinux wheel, right? ########## ci/docker/python-wheel-musllinux.dockerfile: ########## @@ -0,0 +1,106 @@ +# 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. + +ARG base +FROM ${base} + +ARG arch +ARG arch_short +ARG musllinux + +ENV LINUX_WHEEL_NAME='musl' +ENV LINUX_WHEEL_VERSION=${musllinux} + +RUN apk update +RUN apk add --no-cache build-base cmake flex wget zip ninja ccache + +# A system Python is required for ninja and vcpkg in this Dockerfile. +# On manylinux2014 base images, system Python is 2.7.5, while +# on manylinux_2_28, no system python is installed. +# We therefore override the PATH with Python 3.8 in /opt/python +# so that we have a consistent Python version across base images. Review Comment: Could you update this comment? (Do we need this workaround for musllinux too?) ########## dev/tasks/tasks.yml: ########## @@ -404,8 +404,28 @@ tasks: arch: "{{ arch }}" python_version: "{{ python_version }}" python_abi_tag: "{{ abi_tag }}" - manylinux_version: "{{ manylinux_version }}" + linux_wheel_version: "{{ manylinux_version }}" wheel_platform_tag: "{{ platform_tag }}" + linux_wheel_name: "many" + artifacts: + - pyarrow-{no_rc_version}-{{ python_tag }}-{{ abi_tag }}-{{ platform_tag }}.whl +{% endfor %} + +{############################## Wheel Musl Linux ##################################} + + +{% for arch, musllinux_version, platform_tag in [("amd64", "1-2", "musllinux_1_2_x86_64"), + ("arm64", "1-2", "musllinux_1_2_aarch64")] %} Review Comment: Can we merge this "for" with "for" for manylinux? ```yaml {% for wheel_name, arch, version, platform_tag in [...] %} ``` ########## dev/tasks/python-wheels/github.linux.yml: ########## @@ -64,15 +64,15 @@ jobs: env: GITHUB_TOKEN: {{ '${{ secrets.GITHUB_TOKEN }}' }} run: | - if [ "{{ manylinux_version }}" = "2014" ] && [ "{{ arch }}" = "arm64" ]; then + if [ "{{ linux_wheel_version }}" = "2014" ] && [ "{{ arch }}" = "arm64" ]; then # We can't use NuGet on manylinux2014_aarch64 because Mono is old. : - else + elif [ "{{ linux_wheel_name }}" = "many" ]; then Review Comment: Can we install Mono in `python-wheel-musllinux.docker` instead? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
