Local AI in Minutes: Pull Llama Like Docker, Chat From Python
About this lesson
Run Llama 3.2 entirely on your computer—no OpenAI account, no API keys, no credit card, and no data leaving your machine. In this video we install Ollama, pull a model with one command, then call it from Python using the official OpenAI SDK pointed at localhost (OpenAI-compatible API). We also intentionally break the script with a wrong model name so you know how to fix it, and we show streaming responses in a few lines of code. Code from this video GitHub repo: https://github.com/ekb-dev-ai/local-llm What we create together • Install & verify Ollama (ollama --version) • Pull llama3.2 (ollama pull llama3.2) and quick-test in the terminal (ollama run) • Minimal chat.py using OpenAI(base_url="http://localhost:11434/v1", ...) • Match model names with ollama list when something breaks • Bonus: stream=True for token-by-token output Useful links • Ollama: https://ollama.com • Model library: https://ollama.com/library speed depends on your CPU/GPU/RAM; Apple Silicon often feels snappy on llama3.2; smaller machines can try tags like llama3.2:1b. If this helped, subscribe—next up we’re building a local conversational agent with memory
DeepCamp AI