Skip to content

Commit 634283a

Browse files
committed
Script to build ansible-chatbot-service image locally
1 parent 65430eb commit 634283a

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ PYTHON_REGISTRY = testpypi
1616
images: ## Build container images
1717
scripts/build-container.sh
1818

19+
images-aap: requirements.txt ## Build container images
20+
scripts/build-container-aap.sh
21+
1922
install-tools: install-woke ## Install required utilities/tools
2023
# OLS 1085: Service build failure issue caused by newest PDM version
2124
# (right now we need to stick to PDM specified in pyproject.toml file)

scripts/build-container-aap.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
3+
# Build an ansible-chatbot-service image locally
4+
5+
AAP_VERSION=v2.5
6+
LIGHTSPEED_RAG_CONTENT_IMAGE=quay.io/ttakamiy/aap-rag-content:latest
7+
RAG_CONTENTS_SUB_FOLDER=vector_db/aap_product_docs
8+
9+
CACHE_OPTS=""
10+
if [ -z "$OLS_NO_IMAGE_CACHE" ]; then
11+
CACHE_OPTS="--no-cache"
12+
fi
13+
14+
# To build container for local use
15+
podman build \
16+
${CACHE_OPTS} \
17+
--build-arg=VERSION="${AAP_VERSION}" \
18+
--build-arg=LIGHTSPEED_RAG_CONTENT_IMAGE="${LIGHTSPEED_RAG_CONTENT_IMAGE}" \
19+
--build-arg=RAG_CONTENTS_SUB_FOLDER="${RAG_CONTENTS_SUB_FOLDER}" \
20+
-t "${AAP_API_IMAGE:-quay.io/ansible/ansible-chatbot-service:latest}" \
21+
-f Containerfile
22+
23+
# To test-run for local development
24+
#
25+
# podman run --rm \
26+
# --name chatbot-8080 \
27+
# -p 8080:8080 \
28+
# -v ${PWD}/rcsconfig.yaml:/app-root/rcsconfig.yaml:Z \
29+
# -e OPENAI_API_KEY=IGNORED \
30+
# quay.io/ansible/ansible-chatbot-service:latest

0 commit comments

Comments
 (0)