mirror of
https://github.com/zebrajr/tensorflow.git
synced 2025-12-06 12:20:11 +01:00
Fix failing macos arm64 wheel builds
PiperOrigin-RevId: 774958440
This commit is contained in:
parent
fab3235983
commit
612f899e11
|
|
@ -80,6 +80,26 @@ if [[ "${TFCI_MACOS_UPGRADE_PYENV_ENABLE}" == 1 ]]; then
|
||||||
echo "Upgraded pyenv version: $(pyenv --version)"
|
echo "Upgraded pyenv version: $(pyenv --version)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Scheduled nightly and release builds upload build artifacts (Pip packages,
|
||||||
|
# Libtensorflow archives) to GCS buckets. TFCI Mac VMs need to authenticate as
|
||||||
|
# a service account that has the right permissions to be able to do so.
|
||||||
|
set +x
|
||||||
|
if [[ -n "${GOOGLE_APPLICATION_CREDENTIALS:-}" ]]; then
|
||||||
|
# Python 3.12 removed the module `imp` which is needed by gcloud CLI so we set
|
||||||
|
# `CLOUDSDK_PYTHON` to Python 3.11 which is the system Python on TFCI Mac
|
||||||
|
# VMs.
|
||||||
|
pyenv install -s "3.11"
|
||||||
|
if [[ $? -eq 0 ]]; then
|
||||||
|
pyenv local "3.11"
|
||||||
|
export CLOUDSDK_PYTHON=$(pyenv which python3.11)
|
||||||
|
else
|
||||||
|
echo "Python 3.11 not found, falling back to system python"
|
||||||
|
export CLOUDSDK_PYTHON=$(which python3)
|
||||||
|
fi
|
||||||
|
gcloud auth activate-service-account --key-file="${GOOGLE_APPLICATION_CREDENTIALS}"
|
||||||
|
fi
|
||||||
|
set -x
|
||||||
|
|
||||||
# "TFCI_MACOS_PYENV_INSTALL_ENABLE" controls whether to use Pyenv to install
|
# "TFCI_MACOS_PYENV_INSTALL_ENABLE" controls whether to use Pyenv to install
|
||||||
# the Python version set in "TFCI_PYTHON_VERSION" and use it as default.
|
# the Python version set in "TFCI_PYTHON_VERSION" and use it as default.
|
||||||
# We enable this in the nightly and release builds because before uploading the
|
# We enable this in the nightly and release builds because before uploading the
|
||||||
|
|
@ -101,19 +121,6 @@ if [[ "$TFCI_MACOS_TWINE_INSTALL_ENABLE" == 1 ]]; then
|
||||||
pip install twine==3.6.0
|
pip install twine==3.6.0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Scheduled nightly and release builds upload build artifacts (Pip packages,
|
|
||||||
# Libtensorflow archives) to GCS buckets. TFCI Mac VMs need to authenticate as
|
|
||||||
# a service account that has the right permissions to be able to do so.
|
|
||||||
set +x
|
|
||||||
if [[ -n "${GOOGLE_APPLICATION_CREDENTIALS:-}" ]]; then
|
|
||||||
# Python 3.12 removed the module `imp` which is needed by gcloud CLI so we set
|
|
||||||
# `CLOUDSDK_PYTHON` to Python 3.11 which is the system Python on TFCI Mac
|
|
||||||
# VMs.
|
|
||||||
export CLOUDSDK_PYTHON=$(which python3.11)
|
|
||||||
gcloud auth activate-service-account --key-file="${GOOGLE_APPLICATION_CREDENTIALS}"
|
|
||||||
fi
|
|
||||||
set -x
|
|
||||||
|
|
||||||
# When cross-compiling with RBE, we need to copy the macOS sysroot to be
|
# When cross-compiling with RBE, we need to copy the macOS sysroot to be
|
||||||
# inside the TensorFlow root directory. We then define them as a filegroup
|
# inside the TensorFlow root directory. We then define them as a filegroup
|
||||||
# target inside "tensorflow/tools/toolchains/cross_compile/cc" so that Bazel
|
# target inside "tensorflow/tools/toolchains/cross_compile/cc" so that Bazel
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user