Using Ollama through Docker
Moving Models to External SSD on macOS
To move Ollama models to an external SSD when using Docker:
- Stop the Ollama container:
docker stop ollama
- Create a directory on your external SSD:
mkdir /Volumes/YourSSD/ollama-models
- Update the Docker run command to mount the external SSD location:
docker run -d \ -v /Volumes/YourSSD/ollama-models:/root/.ollama \ -p 11434:11434 \ --name ollama \ ollama/ollama
If you already have models and want to move them:
- Copy existing models from the Docker volume to your SSD:
docker cp ollama:/root/.ollama/. /Volumes/YourSSD/ollama-models
- Remove the old Docker volume:
docker volume rm ollama
- Start Ollama with the new mount point as shown above.