mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-28 02:53:30 +00:00
Support building UBI9 base container image (#676)
This adds support for [UBI9 (Red Hat Universal Base Image
9)](615bcf606f
).
Tested `registry.access.redhat.com/ubi9/ubi-minimal:9.5`.
Signed-off-by: Yuan Tang <terrytangyuan@gmail.com>
This commit is contained in:
parent
78727aad26
commit
e45592e229
1 changed files with 14 additions and 1 deletions
|
@ -51,7 +51,19 @@ add_to_docker() {
|
||||||
fi
|
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
|
FROM $docker_base
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
@ -64,6 +76,7 @@ RUN apt-get update && apt-get install -y \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
# Add pip dependencies first since llama-stack is what will change most often
|
# Add pip dependencies first since llama-stack is what will change most often
|
||||||
# so we can reuse layers.
|
# so we can reuse layers.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue