M1 Mac Setup

A random collection of resources to set up an Apple Silicon Mac. Last updated - Feb 22nd 2022

Does it Arm?

An awesome website that let's you check if something works natively on apple silicon macs. Find it here: Does It ARM

Python + ML tools

M1 loves conda, stick to that whenever possible.  

First, install homebrew in case you haven't yet

## Install xcode command line tools
xcode-select --install

## install homebrew
/bin/bash -c "$(curl -fsSL <https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh>)"

Next, install conda through miniforge - this is a very important step! Don't install anaconda or miniconda any other way (Last checked Feb 22nd 2022)

## install miniforge
brew install --cask miniforge

## create a new conda env
conda create --name "first_env" python=3.8

## activate env and check
conda activate first_env
python -V ## should show 3.8 (default on macos is 3.9)

## make sure to install everything through conda if possible!
## some packages are broken on pip (like numpy!)
## incase you can't find a package on conda, use pip as follows

$(env_name) python -m pip install package_name

Increase the speed of key repeats

defaults write -g InitialKeyRepeat -int 10
defaults write -g KeyRepeat -int 1

Installing Tensorflow

(tested on MacOS BigSur 11.2)

# create a conda environment 
conda create -n "tf_m1" python=3.8.10

# activate the environment 
conda activate tf_m1

# install required packages
conda install numpy
conda install scipy
conda install -c apple tensorflow-deps==2.5.0
python -m pip install tensorflow-macos==2.5.0

# this install is optional, but definitely helps
python -m pip install tensorflow-metal

Install SSHFS

https://www.reddit.com/r/macapps/comments/lea865/how_to_install_sshfs_on_big_sur/

NodeJS

Installing nodejs on macOS Apple Silicon (M1)

Random

  • Force the Spotify desktop client to use less storage - append storage.size=1024 to the ~/Library/Application Support/Spotify/prefs file. 1024 is the max size in MB. src