Skip to content

Commit e51bb0f

Browse files
TamiTakamiyajameswnl
authored andcommitted
Script to build ansible-chatbot-service image locally
1 parent 3fb2b3b commit e51bb0f

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
@@ -12,6 +12,9 @@ MODEL := $(if $(MODEL),$(MODEL),"gpt-3.5-turbo")
1212
images: requirements.txt ## Build container images
1313
scripts/build-container.sh
1414

15+
images-aap: requirements.txt ## Build container images
16+
scripts/build-container-aap.sh
17+
1518
install-tools: install-woke ## Install required utilities/tools
1619
# OLS 1085: Service build failure issue caused by newest PDM version
1720
# (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)