Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support building UBI9 base container image #676

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion llama_stack/distribution/build_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,19 @@ add_to_docker() {
fi
}

add_to_docker <<EOF
# Update and install UBI9 components if UBI9 base image is used
if [[ $docker_base == *"registry.access.redhat.com/ubi9"* ]]; then
add_to_docker <<EOF
FROM $docker_base
WORKDIR /app

RUN microdnf -y update && microdnf install -y iputils net-tools wget \
vim-minimal python3.11 python3.11-pip python3.11-wheel \
python3.11-setuptools && ln -s /bin/pip3.11 /bin/pip && microdnf clean all

EOF
else
add_to_docker <<EOF
FROM $docker_base
WORKDIR /app

Expand All @@ -64,6 +76,7 @@ RUN apt-get update && apt-get install -y \
&& rm -rf /var/lib/apt/lists/*

EOF
fi

# Add pip dependencies first since llama-stack is what will change most often
# so we can reuse layers.
Expand Down
Loading