This page is part of the Docker Compose path. You have not chosen a path yet. Pick one and every page follows it, including the sidebar and the next/previous buttons.
This page is part of the Docker Compose path, and you are following Kubernetes / Helm. Nothing on this page applies to your path — you have most likely arrived from a bookmark or a search result. Use the sidebar to get back, or switch paths.
Docker ComposeKubernetes / Helm

Docker Compose Setup

Docker Compose path

This whole page is the Docker Compose path. If you chose Kubernetes / Helm, use Kubernetes / Helm Setup instead.

Prerequisites

RequirementVersionCheck
Docker Engine24+docker version
Docker Composev2.20+docker compose version
Gitanygit --version
jq1.6+jq --version
Free RAM8 GB
Free disk5 GBfor model cache
GPU optional

A discrete GPU (NVIDIA or Apple Silicon) cuts model load time from ~60 s to ~5 s and speeds inference significantly. The labs work without one — first responses will just be slower.

1. Clone the repo

git clone https://github.com/FortinetCloudCSE/ai-101.git
cd ai-101

2. Pull the lab images

Pre-built multi-arch images (amd64 + arm64) are published to GHCR. Pull them all up-front so the lab steps start instantly:

cd ~/ai-101/lab-app/compose
docker compose --profile lab4 pull

lab4 is the superset profile — pulling it once covers all four labs.

3. Pull the model

The first start downloads qwen2.5:3b (~2 GB). Do this now to avoid waiting during the lab:

cd ~/ai-101/lab-app/compose
docker compose --profile lab1 up -d
docker compose logs -f ollama

Wait until you see a line containing pull complete or success. Then stop following the logs with Ctrl+C. The model is cached in the ollama-data Docker volume for all subsequent runs.

4. Verify

curl -s http://localhost:11434/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{"model":"qwen2.5:3b","messages":[{"role":"user","content":"ping"}]}' \
  | jq -r '.choices[0].message.content'

Expected: a short reply from the model (exact text varies).

5. Reference — start/stop per lab

cd ~/ai-101/lab-app/compose

# Lab 1 — Ollama only
docker compose --profile lab1 up -d
docker compose --profile lab1 down

# Lab 2 — Agent + UI (brings Ollama along)
docker compose --profile lab2 up -d

# Lab 3 — MCP server + Agent (MCP mode) + UI
docker compose --profile lab3 up -d

# Lab 4 — Same as lab3, different env vars applied by the lab steps
docker compose --profile lab4 up -d

To check running services:

cd ~/ai-101/lab-app/compose
docker compose ps

To tail all logs:

cd ~/ai-101/lab-app/compose
docker compose logs -f
Keep it running

Leave the stack running as you work through the labs. Each lab section tells you which profile to switch to. Only stop the stack when you are completely done.

6. Cleanup (after the workshop)

cd ~/ai-101/lab-app/compose
docker compose --profile lab4 down
docker volume rm compose_ollama-data