
“This course contains the use of artificial intelligence.”
Most Ollama tutorials stop at chatting with a model in the terminal. This bootcamp starts there and keeps going until you have shipped a real application: a local document assistant written in plain Python that keeps your data on your own machine.
Every lab runs for real on a CPU-only bench built from the official Ollama Docker image and small open models. Every model answer on screen is the model's actual output, including the times a small model gets it wrong, because seeing a failure and adding the guard that catches it is the lesson. Latency and token numbers are measured live from the response fields on that bench, never quoted from a brochure.
You will start with the raw REST API using httpx, so you understand the request, the NDJSON stream and the timing fields before any library hides them. Then you move to the official ollama Python library: chat and generate, streaming, conversation memory, the async client and model management from code.
Next you treat the model as a dependency. You compare models by size, capabilities and licence, tune sampling options, test reproducibility with seed and temperature, measure what num_ctx really does, build a custom model with a Modelfile, and read thinking output from Python. You also point the openai SDK at the local /v1 endpoint and learn exactly what it does and does not support.
The application half of the course covers the features real apps need: JSON schema structured outputs with Pydantic validation and retries, tool calling with a guarded agent loop and allow-listed arguments, embeddings and vector search with sqlite-vec, a complete RAG pipeline with source citations and a small golden set to measure retrieval, and an optional vision feature with an honest look at its cost on CPU.
Finally you put a face on it and ship it: a streaming chat UI in Streamlit with SQLite history, the same chat in Gradio, a FastAPI service with Server-Sent Events, pytest suites with a mocked client and golden-set tests, latency logging, practical prompt-injection defences, and a Dockerfile plus docker compose setup that goes from a clean clone to a running app in one command.
The capstone brings everything together in one repository, oad-app, which grows lecture by lecture. Eleven downloadable Word guides and checklists support the labs, from bench setup to a release runbook.
This course focuses on building applications. Server hardening, Kubernetes and vLLM, and agent frameworks such as LangChain or LangGraph are outside its scope.