DS & ML with Mac M1 draft

This is a draft, the content is not complete and of poor quality!

This is my personal list of to-do things for a new Macbook.

👉 Note: Mac fresh start.
👉 Note: Python installation.
👉 Note: Docker 101.

👉 My dockerfiles on Github.


# Install XCode (from Appstore)

# Install XCode Command Line Tolls
xcode-select --install

# Download & install miniforge3
# https://github.com/conda-forge/miniforge
# (Choose "MacOSX-arm64" version)

chmod +x ~/Downloads/Miniforge3-MacOSX-arm64.sh
sh ~/Downloads/Miniforge3-MacOSX-arm64.sh
source ~/miniforge3/bin/activate

# Restart terminal and check
which python
# /Users/thi/miniforge3/bin/python
which pip
# /Users/thi/miniforge3/bin/pip
# Init conda with zsh?
conda init zsh
source ~/.zshrc
# Create virtual env
conda create -n ds-tf2.5 python=3.9.5
conda activate ds-tf2.5

# Install Tensorflow dependencies
conda install -c apple tensorflow-deps

# Install base tensorflow
python -m pip install tensorflow-macos

# Install metal plugin
python -m pip install tensorflow-metal
# Install needed packages
conda install --file requirements.txt

# single package
conda install -y scikit-learn
# check after installing
pip show scikit-learn

👉🏻 Install scikit-learn on M1 (official note).
👉🏻 Note: Python installation.



# In python environement
import tensorflow as tf
# Jupyter Notebook
jupyter lab