Skip to content

Instantly share code, notes, and snippets.

@nahushrk
nahushrk / ollama_model_manager.py
Created February 1, 2025 07:44
import and export ollama models between computers without downloading again
#!/usr/bin/env python3
"""
Ollama Model Manager
This script provides two modes of operation:
- export: Exports an installed Ollama model to a tarball.
- import: Imports an Ollama model from a tarball.
The export mode reads a manifest file located at:
<base_path>/manifests/registry.ollama.ai/library/<model_name>/<model_size>