- Published on
- Abinyah Walker
Ce billet n'a pas encore été traduit en français.
Setting Up WebUI and Ollama on Apple Silicon: A Guide
In this guide, we explore how to set up WebUI and Ollama on an Apple Silicon, M series chip; enabling you to run your own local machine learning models.
Prerequisites
- Docker.
- Familiarity with command-line operations and basic understanding of macOS terminal commands.
This is what works best for me on Apple silicon (Jan, 2025)
Docker Desktop Running
Ollama running.
docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
access via http://localhost:3000
Method 1: Docker Installation (GPU Support)
Attempting GPU support can offer significant performance improvements. However, due to compatibility issues with Apple Silicon's Metal drivers, this method does not work as expected, using the CPU exclusively.
when typing or copy/pasting the command.
docker run -d -p 3000:8080 --gpus=all -v ollama:/root/.ollama -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:ollama
Troubleshooting GPU Support Issues
If you encounter an error similar to
"could not select device driver with capabilities: [[gpu]]"
it may be due to an incompatibility with Apple's Metal drivers. The fix is to switch to CPU-only method.
Method 2: Docker Installation (CPU-Only, Apple Silicon M series)
Falling back to CPU usage is a reliable alternative when GPU support isn't accessible.
docker run -d -p 3000:8080 -v ollama:/root/.ollama -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:ollama
Automatic updates using Docker Watchtower
Ensure your Docker containers stay updated with this Docker Watchtower image.
Setup Command:
docker run -d --name watchtower --restart unless-stopped -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --interval 300 open-webui
Install and verify Ollama server is running
Check if Ollama is running by accessing http://localhost:11434 by first starting the server:
- Install Ollama, if you haven't already.
- Enable Ollama server using terminal.
ollama serve
Method 3: Using Python, UV or VENV
- Install
uv:- curl -LsSf https://astral.sh/uv/install.sh | sh
- pip install -U open-webui
Using VENV
Install using Python
python3 -m venv venv source venv/bin/activate
Install WebUI:
pip install open-webui
Run the server:
open-webui serve
Updates
Updating with Python // The -U (or --upgrade).
pip install -U open-webui
Conclusion and Further Steps
By following these methods, you can successfully set up WebUI and Ollama on Apple Silicon. Best to use Docker with CPU support if you're not using an external GPU. Although both approaches provide a robust testing environment for your AI exploration.
Consider exploring additional features like model management, API interactions, and performance tuning to maximize your setup's potential. Happy experimenting!