diff --git a/recipes/natural_language_processing/chatbot/Makefile b/recipes/natural_language_processing/chatbot/Makefile index d2b960fa..8f2fc0f8 100644 --- a/recipes/natural_language_processing/chatbot/Makefile +++ b/recipes/natural_language_processing/chatbot/Makefile @@ -26,7 +26,7 @@ quadlet: -e "s|APPIMAGE|${APPIMAGE}|g" \ -e "s|MODELIMAGE|${MODELIMAGE}|g" \ quadlet/${APP}.yaml \ - > /tmp/${APP}.yaml + > build/${APP}.yaml cp quadlet/${APP}.kube build/${APP}.kube .PHONY: install diff --git a/recipes/natural_language_processing/chatbot/bootc/Containerfile b/recipes/natural_language_processing/chatbot/bootc/Containerfile index 4fc166e1..68e00a71 100644 --- a/recipes/natural_language_processing/chatbot/bootc/Containerfile +++ b/recipes/natural_language_processing/chatbot/bootc/Containerfile @@ -24,19 +24,34 @@ ARG APPIMAGE=quay.io/ai-lab/${RECIPE}:latest ARG SERVERIMAGE=quay.io/ai-lab/llamacpp-python:latest # Add quadlet files to setup system to automatically run AI application on boot -COPY quadlet/${RECIPE}.kube quadlet/${RECIPE}.yaml quadlet/${RECIPE}.image /usr/share/containers/systemd +COPY quadlet/${RECIPE}.kube quadlet/${RECIPE}.yaml /usr/share/containers/systemd # Modify quadlet files to match the server, model and app image RUN sed -e "s|SERVERIMAGE|${SERVERIMAGE}|" \ -e "s|APPIMAGE|${APPIMAGE}|g" \ -e "s|MODELIMAGE|${MODELIMAGE}|g" \ -i \ - /usr/share/containers/systemd/${RECIPE}.image \ /usr/share/containers/systemd/${RECIPE}.yaml +# Because images are prepulled, no need for .image quadlet +# COPY quadlet/${RECIPE}.image /usr/share/containers/systemd +# RUN sed -e "s|SERVERIMAGE|${SERVERIMAGE}|" \ +# -e "s|APPIMAGE|${APPIMAGE}|g" \ +# -e "s|MODELIMAGE|${MODELIMAGE}|g" \ +# -i \ +# /usr/share/containers/systemd/${RECIPE}.image + +# Setup /usr/lib/containers/storage as an additional store for images. +# Remove once the base images have this set by default. RUN sed -i -e '/additionalimage.*/a "/usr/lib/containers/storage",' \ /etc/containers/storage.conf +# Added for running as an OCI Container to prevent Overlay on Overlay issues. +VOLUME /var/lib/containers + +# Prepull the model, model_server & application images to populate the system. RUN podman pull --root /usr/lib/containers/storage ${SERVERIMAGE} RUN podman pull --root /usr/lib/containers/storage ${APPIMAGE} RUN podman pull --root /usr/lib/containers/storage ${MODELIMAGE} + +RUN podman system reset --force 2>/dev/null