/install-tf-metal

Installation guide on how to install packages for ML development on mac m1.

How to install tensorflow and other packages on Metal (Mac M1)?

steps

  1. First you need to install miniforge3, i don't know how i previously installed this :P but i can provide you the latest way.
curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
bash Miniforge3-$(uname)-$(uname -m).sh
  1. Activate miniforge3.
source ~/miniforge3/bin/activate
  1. restart terminal.
  2. prevent conda to activate base environment by default.
conda config --set auto_activate_base False
  1. again restart terminal.
  2. export these commands
export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1
export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1
  1. Now is the main step to install tf and other packages (see config.yml) in a virtual env.
conda env create -f config.yml -n metal
  1. activate metal env.
conda activate metal.
  1. (optional) install pytorch, torchvision, you can follow steps here: https://developer.apple.com/metal/pytorch/
conda install pytorch torchvision torchaudio -c pytorch-nightly