-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Containerfile.nocache for bootc images without pre pulled images.
These images can easily be used by setting CONTAINERFILE=Containerfile.nocache in the Makefile. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Showing
4 changed files
with
103 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
recipes/natural_language_processing/codegen/bootc/Containerfile.nocache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Example: an AI powered sample application is embedded as a systemd service | ||
# via Podman quadlet files in /usr/share/containers/systemd | ||
# | ||
# Use build command: | ||
# podman build --build-arg "sshpubkey=$(cat $HOME/.ssh/id_rsa.pub)" -t quay.io/exampleos/myos . | ||
# The --build-arg "SSHPUBKEY=$(cat ~/.ssh/id_rsa.pub)" option inserts your | ||
# public key into the image, allowing root access via ssh. | ||
|
||
FROM quay.io/centos-bootc/centos-bootc:stream9 | ||
ARG SSHPUBKEY | ||
|
||
RUN mkdir /usr/etc-system && \ | ||
echo 'AuthorizedKeysFile /usr/etc-system/%u.keys' >> /etc/ssh/sshd_config.d/30-auth-system.conf && \ | ||
echo ${SSHPUBKEY} > /usr/etc-system/root.keys && chmod 0600 /usr/etc-system/root.keys | ||
|
||
# pre-pull workload images: | ||
# Comment the pull commands to keep bootc image smaller. | ||
# The quadlet .image file added above pulls following images on boot if not | ||
# pre-pulled here | ||
|
||
ARG RECIPE=codegen | ||
ARG MODEL_IMAGE=quay.io/ai-lab/mistral-7b-instruct:latest | ||
ARG APP_IMAGE=quay.io/ai-lab/${RECIPE}:latest | ||
ARG SERVER_IMAGE=quay.io/ai-lab/llamacpp-python:latest | ||
|
||
# Add quadlet files to setup system to automatically run AI application on boot | ||
COPY build/${RECIPE}.image build/${RECIPE}.kube build/${RECIPE}.yaml /usr/share/containers/systemd | ||
|
||
# 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 | ||
|
||
RUN podman system reset --force 2>/dev/null |
34 changes: 34 additions & 0 deletions
34
recipes/natural_language_processing/rag/bootc/Containerfile.nocache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Example: an AI powered sample application is embedded as a systemd service | ||
# via Podman quadlet files in /usr/share/containers/systemd | ||
# | ||
# from recipes/natural_language_processing/rag, run | ||
# 'make bootc' | ||
|
||
FROM quay.io/centos-bootc/centos-bootc:stream9 | ||
|
||
ARG SSHPUBKEY | ||
|
||
# The --build-arg "SSHPUBKEY=$(cat ~/.ssh/id_rsa.pub)" option inserts your | ||
# public key into the image, allowing root access via ssh. | ||
RUN mkdir /usr/etc-system && \ | ||
echo 'AuthorizedKeysFile /usr/etc-system/%u.keys' >> /etc/ssh/sshd_config.d/30-auth-system.conf && \ | ||
echo ${SSHPUBKEY} > /usr/etc-system/root.keys && chmod 0600 /usr/etc-system/root.keys | ||
|
||
ARG RECIPE=rag | ||
ARG MODEL_IMAGE=quay.io/ai-lab/mistral-7b-instruct:latest | ||
ARG APP_IMAGE=quay.io/ai-lab/${RECIPE}:latest | ||
ARG SERVER_IMAGE=quay.io/ai-lab/llamacpp-python:latest | ||
ARG CHROMADBImage=quay.io/ai-lab/chromadb | ||
|
||
# Add quadlet files to setup system to automatically run AI application on boot | ||
COPY build/${RECIPE}.image build/${RECIPE}.kube build/${RECIPE}.yaml /usr/share/containers/systemd | ||
|
||
# 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 | ||
|
||
RUN podman system reset --force 2>/dev/null |
32 changes: 32 additions & 0 deletions
32
recipes/natural_language_processing/summarizer/bootc/Containerfile.nocache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Example: an AI powered sample application is embedded as a systemd service | ||
# via Podman quadlet files in /usr/share/containers/systemd | ||
# | ||
# from recipes/natural_language_processing/summarizer, run | ||
# 'make bootc' | ||
|
||
FROM quay.io/centos-bootc/centos-bootc:stream9 | ||
ARG SSHPUBKEY | ||
|
||
# The --build-arg "SSHPUBKEY=$(cat ~/.ssh/id_rsa.pub)" option inserts your | ||
# public key into the image, allowing root access via ssh. | ||
RUN mkdir /usr/etc-system && \ | ||
echo 'AuthorizedKeysFile /usr/etc-system/%u.keys' >> /etc/ssh/sshd_config.d/30-auth-system.conf && \ | ||
echo ${SSHPUBKEY} > /usr/etc-system/root.keys && chmod 0600 /usr/etc-system/root.keys | ||
|
||
ARG RECIPE=summarizer | ||
ARG MODEL_IMAGE=quay.io/ai-lab/mistral-7b-instruct:latest | ||
ARG APP_IMAGE=quay.io/ai-lab/${RECIPE}:latest | ||
ARG SERVER_IMAGE=quay.io/ai-lab/llamacpp-python:latest | ||
|
||
# Add quadlet files to setup system to automatically run AI application on boot | ||
COPY build/${RECIPE}.image build/${RECIPE}.kube build/${RECIPE}.yaml /usr/share/containers/systemd | ||
|
||
# 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 | ||
|
||
RUN podman system reset --force 2>/dev/null |