Coming from the world of Linux, Mac is a little different. The below steps are what I do in order to setup a Mac M1 Ultra for use as a Unix server.
Base Install
A few notes on the base installation:
- Use wired networking.
- No Apple ID is needed.
- On first login, update to Sonoma.
- Change the computer name.
- Enable remote access(SSHD).
Once remote access is enabled, go to Privacy and enable full disk access for SSHD:
Setup Bash
Open a terminal window and change our default shell to Bash
chsh -s /bin/bash
Create a .bash_profile file:
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
And then create your .bashrc file:
export PS1="\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ "
export PATH="/opt/homebrew/bin:/Users/mmealman/bin:$PATH"
alias ls='ls --color=always'
Install and Enable Brew
We’ll want a decent CLI package manager and Homebrew gives us this. Open a terminal window
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Python 3.11
After Brew is setup, install an updated version of Python:
brew install python@3.11
And add aliases for it to your .bashrc
echo '
alias python=python3.11
alias pip=pip3.11
' >> ~/.bashrc
Miniconda
Then we’ll want to install Miniconda as per https://formulae.brew.sh/cask/miniconda
brew install --cask miniconda
conda init "$(basename "${SHELL}")"
GPU Memory Limit
To up the GPU memory limit, run the below:
sudo /usr/sbin/sysctl iogpu.wired_limit_mb=115200
To make this permanent, add the below to /etc/sysctl.conf
# change default CPU/GPU RAM split
iogpu.wired_limit_mb=115200
To verify this setting on reboot:
sudo /usr/sbin/sysctl -a | grep iogpu.wired_limit_mb
Samba(Optional)
NFS support isn’t great on Mac on the command line, but Samba works well. Here’s an example of adding //fall/AI to /Users/mmealman/fall/AI
mkdir -p /Users/mmealman/fall/AI
mount -t smbfs //mmealman@fall/AI /Users/mmealman/fall/AI