Skip to content
ollama-setup logo

Ollama Setup

ollama-setup

Configure auto-configure Ollama when user needs local LLM deployment,

SKILL.md

Full skill instructions

Ollama Setup

Overview

Auto-configure Ollama for local LLM deployment, eliminating hosted API costs and enabling offline AI inference. This skill handles system assessment, model selection based on available hardware (RAM, GPU), installation across macOS/​Linux/​Docker, and integration with Python, Node.js, and REST API clients.

Prerequisites

  • macOS 12+, Linux (Ubuntu 20.04+, Fedora 36+), or Docker runtime
  • Minimum 8 GB RAM for 7B parameter models; 16 GB for 13B models; 32 GB+ for 70B models
  • Optional: NVIDIA GPU with CUDA drivers for accelerated inference (nvidia-smi to verify)
  • Optional: Apple Silicon (M1/​M2/​M3) for Metal-accelerated inference on macOS
  • Disk space: 4-40 GB depending on model size (quantized weights)
  • Package manager: brew (macOS), curl (Linux), or docker (containerized)

Instructions

  1. Detect the host operating system and available hardware using uname -s, free -h (Linux) or vm_stat (macOS), and nvidia-smi (if GPU present)
  2. Select appropriate models based on available RAM:
    • 8 GB: llama3.2:7b (4 GB), mistral:7b (4 GB), phi3:14b (8 GB)
    • 16 GB: codellama:13b (7 GB), mixtral:8x7b (26 GB quantized)
    • 32 GB+: llama3.2:70b (40 GB), codellama:34b (20 GB)
  3. Install Ollama using the platform-appropriate method:
    • macOS: brew install ollama && brew services start ollama
    • Linux: curl -fsSL https://ollama.com/​install.sh | sh && sudo systemctl start ollama
    • Docker: docker run -d -v ollama:/​root/​.ollama -p 11434:11434 --name ollama ollama/​ollama
  4. Pull the recommended model: ollama pull llama3.2
  5. Verify the installation by listing available models (ollama list) and running a test prompt (ollama run llama3.2 "Say hello")
  6. Confirm the REST API is accessible: curl http://localhost:11434/​api/​tags
  7. Configure integration with the target application using the appropriate client library (Python ollama, Node.js ollama, or raw HTTP)
  8. Set up GPU acceleration if NVIDIA or Apple Silicon hardware is detected
  9. Configure model persistence and cache directory if non-default storage location is required
  10. Validate end-to-end inference latency and throughput for the selected model

See ${CLAUDE_SKILL_DIR}/​references/​skill-workflow.md for the detailed workflow with code snippets.

Output

  • Ollama installation confirmed and running as a system service or Docker container
  • Selected model(s) pulled and cached locally with verified inference capability
  • REST API endpoint accessible at http://localhost:11434
  • Integration code snippet for the target language (Python, Node.js, or cURL)
  • Hardware assessment report: OS, RAM, GPU availability, recommended models
  • Performance baseline: tokens per second for the selected model on local hardware

Error Handling

ErrorCauseSolution
ollama: command not foundInstallation incomplete or PATH not updatedRe-run install script; restart shell session; verify /​usr/​local/​bin/​ollama exists
Model pull fails with timeoutNetwork connectivity issue or Ollama registry unreachableCheck internet connection; retry with ollama pull --insecure behind corporate proxy
Out of memory during inferenceModel size exceeds available RAMSwitch to a smaller quantized model (e.g., 7B instead of 13B); close memory-intensive applications
GPU not detectedCUDA drivers missing or incompatible versionInstall CUDA toolkit >= 11.8; verify with nvidia-smi; restart Ollama service after driver install
Port 11434 already in useAnother service occupying the default Ollama portStop conflicting service; or set OLLAMA_HOST=0.0.0.0:11435 environment variable

See ${CLAUDE_SKILL_DIR}/​references/​errors.md for additional error scenarios.

Examples

Scenario 1: Developer Workstation Setup -- Install Ollama on a macOS M2 machine with 16 GB RAM. Pull codellama:13b for code generation tasks. Integrate with a Python FastAPI application using the ollama Python package. Expected throughput: 30-50 tokens/​second on Apple Silicon.

Scenario 2: Air-Gapped Server Deployment -- Install Ollama on an offline Ubuntu server via pre-downloaded binary. Transfer model weights via USB. Configure as a systemd service with auto-restart. Serve llama3.2:7b via REST API for internal team use.

Scenario 3: Docker-Based CI Pipeline -- Run Ollama in a Docker container as part of a CI/​CD pipeline for automated code review. Pull mistral:7b, expose the API on port 11434, and integrate with a Node.js test harness that sends code diffs for analysis.

Resources

More skills from jeremylongshore

openrouter-compliance-review logo
jeremylongshore/claude-code-plugins-plus-skills

openrouter-compliance-review

Review OpenRouter integration for regulatory compliance (SOC2, GDPR,

2.8K 0
View
maintainx-data-handling logo
jeremylongshore/claude-code-plugins-plus-skills

maintainx-data-handling

Data synchronization, ETL patterns, and data management for MaintainX.

2.8K 0
View
groq-core-workflow-a logo
jeremylongshore/claude-code-plugins-plus-skills

groq-core-workflow-a

Execute Groq primary workflow: chat completions with tool use and JSON

2.8K 0
View
validating-csrf-protection logo
jeremylongshore/claude-code-plugins-plus-skills

validating-csrf-protection

Validate CSRF protection implementations for security gaps. Use when

2.8K 0
View
api-contract logo
jeremylongshore/claude-code-plugins-plus-skills

api-contract

Configure this skill should be used when the user asks about "API contract",

2.8K 0
View
ideogram-incident-runbook logo
jeremylongshore/claude-code-plugins-plus-skills

ideogram-incident-runbook

Execute Ideogram incident response with triage, mitigation, and postmortem.

2.8K 0
View
gamma-sdk-patterns logo
jeremylongshore/claude-code-plugins-plus-skills

gamma-sdk-patterns

Reusable patterns for the Gamma REST API (no SDK exists).

2.8K 0
View
deepgram-sdk-patterns logo
jeremylongshore/claude-code-plugins-plus-skills

deepgram-sdk-patterns

Apply production-ready Deepgram SDK patterns for TypeScript and Python.

2.8K 0
View
openrouter-upgrade-migration logo
jeremylongshore/claude-code-plugins-plus-skills

openrouter-upgrade-migration

Migrate to OpenRouter from direct provider APIs or upgrade between SDK/model

2.8K 0
View
openrouter-common-errors logo
jeremylongshore/claude-code-plugins-plus-skills

openrouter-common-errors

Diagnose and fix common OpenRouter API errors. Use when encountering

2.8K 0
View
linear-cost-tuning logo
jeremylongshore/claude-code-plugins-plus-skills

linear-cost-tuning

Optimize Linear API usage, reduce unnecessary calls, and maximize

2.8K 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View