Skip to content

Commit 385a992

Browse files
committed
container-images: pin mesa version to COPR
When building on Fedora systems make sure we install the mesa version from the COPR, which has the patches to force alignment to 16K (needed for GPU acceleration on macOS, but harmless to other systems). We also need to add "--nobest" to "dnf update" to ensure it doesn't get frustrated by being unable to install the mesa package from appstream. Signed-off-by: Sergio Lopez <[email protected]>
1 parent dc43419 commit 385a992

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

container-images/scripts/build_llama_and_whisper.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,20 +89,22 @@ add_stream_repo() {
8989

9090
rm_non_ubi_repos() {
9191
local dir="/etc/yum.repos.d"
92-
rm -rf $dir/mirror.stream.centos.org_9-stream_* $dir/epel* $dir/_copr:*
92+
rm -rf $dir/mirror.stream.centos.org_9-stream_* $dir/epel*
9393
}
9494

9595
is_rhel_based() { # doesn't include openEuler
9696
[[ "${ID}" == "rhel" || "${ID}" == "redhat" || "${ID}" == "centos" ]]
9797
}
9898

9999
dnf_install_mesa() {
100-
if is_rhel_based; then
101-
dnf copr enable -y slp/mesa-krunkit "epel-9-$uname_m"
102-
add_stream_repo "AppStream"
100+
if [ "${ID}" = "fedora" ]; then
101+
dnf copr enable -y slp/mesa-libkrun-vulkan
102+
dnf install -y mesa-vulkan-drivers-25.0.7-100.fc42 "${vulkan_rpms[@]}"
103+
dnf versionlock add mesa-vulkan-drivers-25.0.7-100.fc42
104+
else
105+
dnf install -y mesa-vulkan-drivers "${vulkan_rpms[@]}"
103106
fi
104107

105-
dnf install -y mesa-vulkan-drivers "${vulkan_rpms[@]}"
106108
rm_non_ubi_repos
107109
}
108110

container-images/scripts/build_rag.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ $2"
2727

2828
update_python() {
2929
if available dnf; then
30-
dnf update -y --allowerasing
30+
dnf update -y --allowerasing --nobest
3131
dnf install -y "${python}" "${python}-pip" "${python}-devel" "${pkgs[@]}"
3232
if [[ "${python}" == "python3.11" ]]; then
3333
ln -sf /usr/bin/python3.11 /usr/bin/python3

0 commit comments

Comments
 (0)