From a98e9397d0244fed01ff070b864af34e2cac17ad Mon Sep 17 00:00:00 2001 From: "yuchen.cc" Date: Thu, 29 Aug 2024 14:05:22 +0800 Subject: [PATCH] build in manylinux2014 Signed-off-by: yuchen.cc --- .github/workflows/build_wheel.yml | 2 +- .github/workflows/build_wheel/Dockerfile | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml index 967da9c..5a4e12a 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheel.yml @@ -35,7 +35,7 @@ jobs: PYTHON_VERSION=${{ matrix.python }} PYTHON_VERSION=${PYTHON_VERSION//./} echo "PYTHON_VERSION=${PYTHON_VERSION}" - BUILD_IMAGE="ghcr.io/${GITHUB_REPOSITORY,,}/connector_builder:base" + BUILD_IMAGE="quay.io/pypa/manylinux2014_x86_64:2024-03-10-4935fcc" echo "BUILD_IMAGE=${BUILD_IMAGE}" RELEASE_IMAGE="ghcr.io/${GITHUB_REPOSITORY,,}/connector_builder:${RELEASE_VERSION}" echo "RELEASE_IMAGE=${RELEASE_IMAGE}" diff --git a/.github/workflows/build_wheel/Dockerfile b/.github/workflows/build_wheel/Dockerfile index cdab8ae..db30660 100644 --- a/.github/workflows/build_wheel/Dockerfile +++ b/.github/workflows/build_wheel/Dockerfile @@ -8,11 +8,12 @@ COPY --from=release /libosstorchconnector . COPY . . ARG PYTHON_VERSION ENV PY_VER=${PYTHON_VERSION} -RUN source /root/miniconda3/etc/profile.d/conda.sh && \ - export PATH="/root/miniconda3/bin:$PATH" && \ - conda activate py${PY_VER} && \ +ENV PY_ABI_TAG=cp${PY_VER}-cp${PY_VER} +RUN export PATH="/opt/python/${PY_ABI_TAG}/bin:$PATH" && \ + python3 -V && \ echo -e "[build_ext]\nlibrary_path=oss_connector.cpython-${PY_VER}-x86_64-linux-gnu.so" > setup.cfg && \ - python3 -u setup.py bdist_wheel + python3 -u setup.py bdist_wheel && \ + auditwheel repair dist/osstorchconnector*.whl -w repaired_wheel FROM scratch -COPY --from=builder /libosstorchconnector/dist/osstorchconnector* / +COPY --from=builder /libosstorchconnector/repaired_wheel/osstorchconnector* /