-
Notifications
You must be signed in to change notification settings - Fork 613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apple silicon support #2504
Apple silicon support #2504
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't affect builds on other platforms.
Following the way the original code, I left the versions hard-coded.
I follow your instruction to build from source. But got the following error when running
|
Are you using an intel mac? In your error messages, "macosx_10_13_x86_64" is found. In the build script (addons/build_deps/build_pip_pkg.sh), m1 mac uses "macosx_11_0_arm64", intel mac uses "macosx_10_13_x86_64".
|
My fault, I ran the term in Rosetta mode and |
I'm having an error with: |
/cc @lgeiger |
@bhack sounds like pip doesn't recognize the MacOS version tag. Can you try updating via |
I am getting an error while executing the The error:
I think it has something to do with the hashes. Found a similar issue here: https://github.com/tensorflow/tensorflow/issues/13106 But I am not sure what to change. For context I followed this for installing tensorflow: https://github.com/apple/tensorflow_macos/issues/153 I am on M1 Chip with Miniforge. Would appreciate any help thanks (@tetsuyasu). The immediate goal is to use hugging face which I think has a dependency on TF. PS: I tried removing the |
Description
Brief Description of the PR: Apple silicon support.
Fixes #2503
Type of change
Checklist:
How Has This Been Tested?
The steps are as follows.
create python virtual environment
(I installed python 3.9.5 with pyenv and pyenv-virtualenv.)
install tensorflow
pip install tensorflow-macos
pip install tensorflow-metal
install bazel 3.7.2
xcode-select --install || echo OK
export BAZEL_VERSION=3.7.2
curl -fLO "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-installer-darwin-x86_64.sh"
chmod +x "bazel-${BAZEL_VERSION}-installer-darwin-x86_64.sh"
./bazel-${BAZEL_VERSION}-installer-darwin-x86_64.sh --user
(set the PATH to bazel)
install tensorflow-addons
export HDF5_DISABLE_VERSION_CHECK=1
git clone https://github.com/tensorflow/addons.git/
cd addons
python3 ./configure.py
bazel build build_pip_pkg
pip install pathlib
bazel-bin/build_pip_pkg artifacts
pip install artifacts/tensorflow_addons-*.whl