Deploying C# 8.0 on Mac Mini M4: High-Performance Setup
Optimizing 16GB RAM and M4 architecture for high-performance API delivery.
"The Mac Mini M4 is not just a desktop; it's a powerhouse for C# developers, allowing local LLMs and APIs to run with zero thermal throttling."
1 Environment Variables Configuration
To ensure your API connects to Ollama and other local services persistently, you must configure the system environment by editing your .zshrc file.
1. Open the editor: nano ~/.zshrc
2. Paste these lines at the end of the file:
export OLLAMA_HOST="http://localhost:11434"
3. Save (
export ASPNETCORE_ENVIRONMENT="Development"
Ctrl+O, Enter) and Exit (Ctrl+X).
4. Apply changes immediately: source ~/.zshrc
2 SDK and Toolchain Installation
We prepare the system using Homebrew and the .NET 8 SDK, specifically optimized for the Apple Silicon M4 ARM architecture.
brew install --cask dotnet-sdk@8
xcode-select --install
brew install db-browser-for-sqlite
3 Local AI with Ollama
Download the inference engine and the Qwen 3.5 model to allow your API to process natural language locally on the M4 NPU.
curl -fsSL https://ollama.com/install.sh | sh
ollama pull qwen3.5:9b
4 API Deployment Flow
Finally, we clone the RepoName repository and perform a production-ready publish to generate optimized binaries.
git config --global credential.helper 'osxkeychain'
git clone https://github.com/User/repo-name.git
cd repo-name/src
dotnet publish -c Release -o ./publish
cd publish && ./AppName.Api
Comentarios
Publicar un comentario