| name | chatqna-build |
| description | Build Chat Question and Answer Core Docker images from source using direct Docker or Docker Compose build commands (backend CPU, backend GPU, backend Ollama, and UI). Use this skill when the user says "build chatqna", "rebuild images", "build from source", or "prepare images for deployment". Dockerfiles and docker/compose.yaml are the source of truth for builds, not the Makefile.
|
| metadata | {"version":"1.0.0","tags":"chatqna build development docker compose"} |
| argument-hint | Describe what images to build and for which runtime (for example "build openvino cpu + ui" or "build ollama backend and ui with tag dev").
|
ChatQnA Build
Build Chat Question and Answer Core container images directly with Docker and
Docker Compose.
Codebase root: sample-applications/chat-question-and-answer-core/
Build Sources of Truth
| File | Purpose |
|---|
docker/Dockerfile | OpenVINO backend image (CPU by default; GPU via USE_GPU=true) |
docker/Dockerfile.ollama | Ollama backend image |
ui/Dockerfile | Frontend UI image |
docker/compose.yaml | Canonical image names, build contexts, and build args |
When to Use
- Build backend and UI images from source
- Rebuild one runtime variant (OpenVINO CPU, OpenVINO GPU, or Ollama)
- Build images with explicit tags before local deploy/publish
Build Controls
Set tags and optional registry prefix in shell before building:
| Var | Effect | Default |
|---|
BACKEND_TAG | tag for backend image ${REGISTRY}chatqna:${BACKEND_TAG} | latest |
UI_TAG | tag for UI image ${REGISTRY}chatqna-ui:${UI_TAG} | latest |
REGISTRY | image prefix (for example intel/) | empty |
http_proxy / https_proxy / no_proxy | forwarded into builds | inherited |
Final image names match compose:
- Backend OpenVINO/Ollama:
${REGISTRY}chatqna:${BACKEND_TAG}
- UI:
${REGISTRY}chatqna-ui:${UI_TAG}
Typical Build Flows
cd sample-applications/chat-question-and-answer-core
export REGISTRY=""
export BACKEND_TAG="latest"
export UI_TAG="latest"
docker build -t ${REGISTRY}chatqna:${BACKEND_TAG} -f docker/Dockerfile .
docker build --build-arg USE_GPU=true -t ${REGISTRY}chatqna:${BACKEND_TAG} -f docker/Dockerfile .
docker build -t ${REGISTRY}chatqna:${BACKEND_TAG} -f docker/Dockerfile.ollama .
docker build -t ${REGISTRY}chatqna-ui:${UI_TAG} -f ui/Dockerfile ui/
Compose-driven alternative (build only, no start):
source scripts/setup_env.sh
docker compose -f docker/compose.yaml build
Prerequisites and Gotchas
- Docker engine and Docker Compose plugin must be available.
- OpenVINO GPU builds require hosts and runtimes that support
/dev/dri for later runtime.
source scripts/setup_env.sh is recommended before compose builds so profile/env values are aligned.
- If reusing the same
${BACKEND_TAG} across variants, the latest build will overwrite that local tag.
Verify
docker images | grep -E 'chatqna|chatqna-ui'
docker compose -f docker/compose.yaml config --services
Completion Criteria
- Requested runtime/backend images are built successfully.
- Resulting local image tags match requested
REGISTRY and tags.
- Build output and next action (deploy or push) are clearly reported.