Skip to content

Commit c588b84

Browse files
Makefile fixes (#93)
1. The faiss store needs to also have group write perms 2. The make run needs to use localhost/ansible-chatbot-stack:<version> Signed-off-by: Ricardo Carrillo Cruz <[email protected]>
1 parent 82e9e8c commit c588b84

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Makefile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ NC := \033[0m # No Color
2020
# Choose between docker and podman based on what is available
2121
ifeq (, $(shell which podman))
2222
CONTAINER_RUNTIME ?= docker
23+
IMAGE_PREFIX ?=
2324
else
2425
CONTAINER_RUNTIME ?= podman
26+
IMAGE_PREFIX ?= localhost/
2527
endif
2628

2729

@@ -81,8 +83,8 @@ vector_db/aap_faiss_store.db:
8183
gzip -d ./vector_db/aap_faiss_store.db.gz
8284
# this permission changes will allow the container user 1001 to read/write the files
8385
# in these directories
84-
chmod -R o+rw ./vector_db/
85-
chmod -R o+rw ./embeddings_model/
86+
chmod -R og+rw ./vector_db/
87+
chmod -R og+rw ./embeddings_model/
8688

8789
# Pre-check required environment variables for build
8890
check-env-build:
@@ -136,7 +138,7 @@ run: check-env-run
136138
--env INFERENCE_MODEL=$(ANSIBLE_CHATBOT_INFERENCE_MODEL) \
137139
--env INFERENCE_MODEL_FILTER=$(ANSIBLE_CHATBOT_INFERENCE_MODEL_FILTER) \
138140
--env GEMINI_API_KEY=$(GEMINI_API_KEY) \
139-
ansible-chatbot-stack:$(ANSIBLE_CHATBOT_VERSION)
141+
$(IMAGE_PREFIX)ansible-chatbot-stack:$(ANSIBLE_CHATBOT_VERSION)
140142

141143
run-test:
142144
@echo "Running test query against lightspeed-core/lightspeed-stack's /config endpoint..."
@@ -175,7 +177,7 @@ run-local-db: check-env-run-local-db
175177
--env INFERENCE_MODEL=$(ANSIBLE_CHATBOT_INFERENCE_MODEL) \
176178
--env INFERENCE_MODEL_FILTER=$(ANSIBLE_CHATBOT_INFERENCE_MODEL_FILTER) \
177179
--env GEMINI_API_KEY=$(GEMINI_API_KEY) \
178-
ansible-chatbot-stack:$(ANSIBLE_CHATBOT_VERSION)
180+
$(IMAGE_PREFIX)ansible-chatbot-stack:$(ANSIBLE_CHATBOT_VERSION)
179181

180182
clean:
181183
@echo "Cleaning up..."
@@ -199,7 +201,7 @@ deploy-k8s:
199201

200202
shell:
201203
@echo "Getting a shell in the container..."
202-
$(CONTAINER_RUNTIME) run --security-opt label=disable -it --entrypoint /bin/bash ansible-chatbot-stack:$(ANSIBLE_CHATBOT_VERSION)
204+
$(CONTAINER_RUNTIME) run --security-opt label=disable -it --entrypoint /bin/bash $(IMAGE_PREFIX)ansible-chatbot-stack:$(ANSIBLE_CHATBOT_VERSION)
203205

204206
# Pre-check required environment variables for tag-and-push
205207
check-env-tag-and-push:

0 commit comments

Comments
 (0)