Skip to content

Latest commit

 

History

History
115 lines (81 loc) · 3.07 KB

mac_installation.md

File metadata and controls

115 lines (81 loc) · 3.07 KB

MacOS Installation

This is a guide for how to install FastEstimator on MacOS starting from a brand new machine. If you already have some of the dependencies that are mentioned here, you can skip down to where the steps start becoming relevant for you.

Step 0: Install Homebrew

If you don't have brew installed yet, you can install it following the instructions here.

Step 1: Install System Dependencies

brew update && brew install pyenv pyenv-virtualenv
echo 'eval "$(pyenv init --path)"' >> ~/.zprofile
echo 'eval "$(pyenv init -)"' >> ~/.zshrc
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.zshrc
brew install zlib sqlite bzip2 libiconv libzip openssl rust

The following graphviz and mactex dependencies are kind of large (~5GB), so you can skip them if you don't want to use auto-doc generation features like Traceability reports. You can also choose to install them later if you change your mind.

brew install graphviz
brew install --cask mactex  # You could alternatively get this from https://www.tug.org/mactex/mactex-download.html
eval "$(/usr/libexec/path_helper)"  # You can skip this line if you instead restart your terminal window

Step 2: Install Miniforge

CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix bzip2)/include -I$(brew --prefix readline)/include -I$(brew --prefix zlib)/include -I$(brew --prefix sqlite)/include -I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix bzip2)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix zlib)/lib -L$(brew --prefix sqlite)/lib" pyenv install miniforge3-4.14.0-2
pyenv global miniforge3-4.14.0-2

Step 3: Create a python environment

conda update --force conda -y
conda create -n FE16 python=3.8 -y

Use pyenv rather than conda to activate your virtual environment to ensure that both pip and conda will point to the same python environment:

pyenv activate FE16

Step 4: Install python dependencies

conda install -c apple tensorflow-deps==2.10.0 -y
python -m pip install tensorflow-macos==2.11.0
python -m pip install tensorflow-metal==0.7.1
python -m pip install torch==2.0.1 torchvision==0.15.2 torchaudio==2.0.2
conda install qtconsole -y
conda install jupyter -y
conda install -c conda-forge jupyterlab -y

Jupyterlab smuggles in a different version of urllib3 which we need to get rid of to prevent some warning messages later:

pip uninstall -y urllib3 && pip install urllib3==1.26.16

Step 5: Install FastEstimator

For regular usage:

pip install fastestimator

For FE developers:

git clone https://github.com/fastestimator/fastestimator.git
cd fastestimator
pip install -e .