From 93af4205959ddb537cc25006d4d79fce51db4b04 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 27 Nov 2023 20:28:27 +0000 Subject: [PATCH] fix venv mac --- Jenkinsfile | 8 +++----- requirements.txt | 3 +-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ca3ea04bb..40acd6480 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -105,14 +105,12 @@ pipeline { sh "chmod +x bazelisk-darwin-arm64" sh "./bazelisk-darwin-arm64 build //:xcore-opt --cpu=darwin_arm64 --copt=-fvisibility=hidden --copt=-mmacosx-version-min=11.0 --linkopt=-mmacosx-version-min=11.0 --linkopt=-dead_strip --//:disable_version_check" } - dir("python") { - sh "python -m venv venv" - sh ". .venv/bin/activate" + createVenv("requirements.txt") + dir("python") { withVenv { sh "pip install wheel setuptools setuptools-scm numpy six --no-cache-dir" sh "python setup.py bdist_wheel --plat-name macosx_11_0_arm64" - sh "deactivate" stash name: "mac_arm_wheel", includes: "dist/*" - } + } } } post { cleanup { xcoreCleanSandbox() } } } diff --git a/requirements.txt b/requirements.txt index 542eeac78..2c61cb375 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,8 +3,7 @@ # Doesn't work on x86 macs: latest version is 2.11? tensorflow==2.14.0; sys_platform != 'darwin' and platform_machine != 'arm64' -tensorflow-macos==2.14.0; sys_platform == 'darwin' # and platform_machine == 'arm64' -# https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-2.14.0-cp311-cp311-macosx_10_15_x86_64.whl; sys_platform == 'darwin' and platform_machine != 'arm64' +tensorflow-macos==2.14.0; sys_platform == 'darwin' numpy>=1.20 pkgconfig==1.5.5 protobuf>=3.20.3