Skip to content

Instantly share code, notes, and snippets.

@sharavsambuu
Created January 23, 2022 18:26
Show Gist options
  • Select an option

  • Save sharavsambuu/cc7bd8e06590c81a5279481100805471 to your computer and use it in GitHub Desktop.

Select an option

Save sharavsambuu/cc7bd8e06590c81a5279481100805471 to your computer and use it in GitHub Desktop.
Install tensorflow on Apple M1
brew install hdf5
export HDF5_DIR=/opt/homebrew/Cellar/hdf5/1.12.0_4
pip3 install --no-binary=h5py h5py
virtualenv -p python env && source env/bin/activate
pip install h5py
pip install tensorflow-macos
pip install tensorflow-metal
# references
https://blog.tensorflow.org/2021/06/pluggabledevice-device-plugins-for-TensorFlow.html
https://developer.apple.com/metal/tensorflow-plugin/
https://blog.tensorflow.org/2020/11/accelerating-tensorflow-performance-on-mac.html
https://en.wikipedia.org/wiki/Apple_M1
https://www.youtube.com/watch?v=5AwdkGKmZ0I
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment