diff --git a/.ado/publish.yml b/.ado/publish.yml index 50d13d7d4c..4eda50e0c4 100644 --- a/.ado/publish.yml +++ b/.ado/publish.yml @@ -299,7 +299,7 @@ extends: python -m pip install auditwheel patchelf ls target/wheels ls target/wheels/*.whl | xargs auditwheel show - ls target/wheels/*.whl | xargs auditwheel repair --wheel-dir ./target/wheels/ --plat manylinux_2_31_x86_64 + ls target/wheels/*.whl | xargs auditwheel repair --wheel-dir ./target/wheels/ --plat manylinux_2_35_x86_64 rm target/wheels/*-linux_x86_64.whl ls target/wheels displayName: Run auditwheel for Linux Wheels @@ -313,10 +313,8 @@ extends: condition: and(eq(variables['Agent.OS'], 'Linux'), eq(variables['arch'], 'aarch64')) - script: | - chmod +x ./docker/linux-aarch64/build.sh chmod +x ./docker/linux-aarch64/run.sh - ./docker/linux-aarch64/build.sh ./docker/linux-aarch64/run.sh displayName: Run auditwheel and python tests for Linux aarch64 Wheels condition: and(eq(variables['Agent.OS'], 'Linux'), eq(variables['arch'], 'aarch64')) diff --git a/docker/linux-aarch64/Dockerfile b/docker/linux-aarch64/Dockerfile deleted file mode 100644 index 9da3e9cf58..0000000000 --- a/docker/linux-aarch64/Dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. - -ARG BASE_IMAGE -FROM --platform=linux/arm64/v8 ${BASE_IMAGE} - -# install python and pip -RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get install \ - python3-minimal python3-pip python3-venv \ - --no-install-recommends -y && \ - apt-get clean - -# We don't update pip here as we need to update it -# inside the virtual environment. Otherwise, we get two versions -# of pip installed, and the one outside the virtual environment -# causes problems. - -ENTRYPOINT ["sh", "-c", "$*", "--"] diff --git a/docker/linux-aarch64/build.sh b/docker/linux-aarch64/build.sh deleted file mode 100644 index 5bc33ea207..0000000000 --- a/docker/linux-aarch64/build.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. - -set -e - -SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -echo "SCRIPT_DIR: ${SCRIPT_DIR}" - -BASE_IMAGE="${BASE_IMAGE:-ubuntu:20.04}" -echo "BASE_IMAGE: ${BASE_IMAGE}" - -TAG="${TAG:-qsharp-linux-aarch64-runner}" -echo "TAG: ${TAG}" - -docker build -t ${TAG} --build-arg BASE_IMAGE=${BASE_IMAGE} -f ${SCRIPT_DIR}/Dockerfile ${SCRIPT_DIR} diff --git a/docker/linux-aarch64/entrypoint.sh b/docker/linux-aarch64/entrypoint.sh index 0381036638..3a555b1188 100644 --- a/docker/linux-aarch64/entrypoint.sh +++ b/docker/linux-aarch64/entrypoint.sh @@ -11,7 +11,7 @@ echo "SCRIPT_DIR: ${SCRIPT_DIR}" WHEEL_ARCH="${WHEEL_ARCH:-aarch64}" echo "WHEEL_ARCH: ${WHEEL_ARCH}" -WHEEL_PLATFORM="${WHEEL_PLATFORM:-manylinux_2_31_${WHEEL_ARCH}}" +WHEEL_PLATFORM="${WHEEL_PLATFORM:-manylinux_2_35_${WHEEL_ARCH}}" echo "WHEEL_PLATFORM: ${WHEEL_PLATFORM}" PIP_DIR="${PIP_DIR:-${SCRIPT_DIR}/../../pip}" diff --git a/docker/linux-aarch64/run.sh b/docker/linux-aarch64/run.sh index 5387fba6fa..6b6302f9d9 100644 --- a/docker/linux-aarch64/run.sh +++ b/docker/linux-aarch64/run.sh @@ -8,11 +8,11 @@ set -e SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) echo "SCRIPT_DIR: ${SCRIPT_DIR}" -TAG="${TAG:-qsharp-linux-aarch64-runner}" -echo "TAG: ${TAG}" +BASE_IMAGE="${BASE_IMAGE:-mcr.microsoft.com/cbl-mariner/base/python:3.9}" +echo "BASE_IMAGE: ${BASE_IMAGE}" VOLUME_ROOT=$(realpath ${SCRIPT_DIR}/../..) echo "VOLUME_ROOT: ${VOLUME_ROOT}" -echo "docker run --platform linux/arm64/v8 -v ${VOLUME_ROOT}:/qsharp -e WHEEL_DIR='/qsharp/target/wheels' ${TAG} bash /qsharp/docker/linux-aarch64/entrypoint.sh" -docker run --platform linux/arm64/v8 -v ${VOLUME_ROOT}:/qsharp -e WHEEL_DIR='/qsharp/target/wheels' ${TAG} bash /qsharp/docker/linux-aarch64/entrypoint.sh +echo "docker run --platform linux/arm64/v8 -v ${VOLUME_ROOT}:/qsharp -e WHEEL_DIR='/qsharp/target/wheels' ${BASE_IMAGE} bash /qsharp/docker/linux-aarch64/entrypoint.sh" +docker run --platform linux/arm64/v8 -v ${VOLUME_ROOT}:/qsharp -e WHEEL_DIR='/qsharp/target/wheels' ${BASE_IMAGE} bash /qsharp/docker/linux-aarch64/entrypoint.sh