Skip to content

Commit

Permalink
Merge branch 'main' into TamiTakamiya/AAP-34976/allow-to-specify-a-ta…
Browse files Browse the repository at this point in the history
…g-to-rag-image
  • Loading branch information
TamiTakamiya authored Nov 6, 2024
2 parents 8ecb507 + 1f278c4 commit 72a6ae6
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
30 changes: 30 additions & 0 deletions scripts/build-container-aap.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 72a6ae6

Please sign in to comment.