diff --git a/Makefile b/Makefile index 879a751b..75e0e68f 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,9 @@ MODEL := $(if $(MODEL),$(MODEL),"gpt-3.5-turbo") images: requirements.txt ## Build container images scripts/build-container.sh +images-aap: requirements.txt ## Build container images + scripts/build-container-aap.sh + install-tools: install-woke ## Install required utilities/tools # OLS 1085: Service build failure issue caused by newest PDM version # (right now we need to stick to PDM specified in pyproject.toml file) diff --git a/scripts/build-container-aap.sh b/scripts/build-container-aap.sh new file mode 100755 index 00000000..1ea81033 --- /dev/null +++ b/scripts/build-container-aap.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# Build an ansible-chatbot-service image locally + +AAP_VERSION=v2.5 +LIGHTSPEED_RAG_CONTENT_IMAGE=quay.io/ttakamiy/aap-rag-content:latest +RAG_CONTENTS_SUB_FOLDER=vector_db/aap_product_docs + +CACHE_OPTS="" +if [ -z "$OLS_NO_IMAGE_CACHE" ]; then + CACHE_OPTS="--no-cache" +fi + +# To build container for local use +podman build \ + ${CACHE_OPTS} \ + --build-arg=VERSION="${AAP_VERSION}" \ + --build-arg=LIGHTSPEED_RAG_CONTENT_IMAGE="${LIGHTSPEED_RAG_CONTENT_IMAGE}" \ + --build-arg=RAG_CONTENTS_SUB_FOLDER="${RAG_CONTENTS_SUB_FOLDER}" \ + -t "${AAP_API_IMAGE:-quay.io/ansible/ansible-chatbot-service:latest}" \ + -f Containerfile + +# To test-run for local development +# +# podman run --rm \ +# --name chatbot-8080 \ +# -p 8080:8080 \ +# -v ${PWD}/rcsconfig.yaml:/app-root/rcsconfig.yaml:Z \ +# -e OPENAI_API_KEY=IGNORED \ +# quay.io/ansible/ansible-chatbot-service:latest