MacBook Pro@2021
Table of Contents
1. Homebrew
2. MacPort
Install and upgrade open source software on macOS. https://ports.macports.org/
3. GNUcore
4. Git
4.1. Account
name & address
git config --global user.name "Your name" git config --global user.email "Your email address"
Remote Repository at GitHub
ssh-keygen -t rsa -C "youremail@example.com"
.ssh could be found in home folder. id\rsa and idrsa.pub
5. Maching Learning
- Run PyTorch Natively on M1 MacBooks
Installing Python’s deep learning libraries
- Step 1 - Install and configure Miniforge
- Install XCode Build Tools In the App Store to install XCode
Install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Install Miniforge Restart the Terminal and
brew install miniforge
Initialse the Conda for the Z shell
conda init zsh
Restart the Terminal.
Step 2 — Create a virtual environment
conda create --name pytorch_env python=3.9
Activate the created new virtual environment:
conda activate pytorch_env
Step 3 — Install PyTorch
conda install pytorch torchvision torchaudio -c pytorch
Step 4 — Testing PyTorch’s GitHub page comes with many examples, one of which is the script for training a handwritten digit classifier (link).
python main.py
Open up the Activity Monitor to verify Python is running natively.
If you see “Apple” under “Kind”, it means the program is running natively on the M1 chip, and not under the Rosetta emulator.
- Step 1 - Install and configure Miniforge
6. Terminal Beautification
- State "NEXT" from "DONE"
- State "DONE" from "PROJECT"
- State "PROJECT" from "DONE"
- State "DONE" from "PROJECT"
- State "PROJECT" from "DONE"
- State "DONE" from "NEXT"
6.1. Install HomeBrew
Excute in a terminal:
path+=/opt/homebrew/bin
add "path+=/opt/homebrew/bin" in the file .zprofile
6.2. Install iTerm2
brew install --cask iterm2
add fonts: (should install svn first)
brew tap homebrew/cask-fonts && brew install --cask font-source-code-pro
6.3. Install oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
update:
omz update
- plugins
Top 10 plugins: https://travis.media/top-10-oh-my-zsh-plugins-for-productive-developers/
- macos
- dotenv
- docker
- Themes
Top 12 Theme: https://travis.media/top-12-oh-my-zsh-themes-for-productive-developers/#20210921-eastwood
- apple
- Options
- font, Source Pro 14