From 3e41c4ebe7d156b571acb733e312127f81bd2c2c Mon Sep 17 00:00:00 2001 From: Steffen Roecker Date: Wed, 9 Oct 2024 17:49:12 +0200 Subject: [PATCH] Initial version of aarch64 container with Vulkan Signed-off-by: Steffen Roecker --- container-images/aarch64/Containerfile | 52 ++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 container-images/aarch64/Containerfile diff --git a/container-images/aarch64/Containerfile b/container-images/aarch64/Containerfile new file mode 100644 index 0000000..8238220 --- /dev/null +++ b/container-images/aarch64/Containerfile @@ -0,0 +1,52 @@ +FROM registry.access.redhat.com/ubi9/ubi:9.4-1214.1726694543 + +# renovate: datasource=github-releases depName=huggingface/huggingface_hub extractVersion=^v(?.*) +ARG HUGGINGFACE_HUB_VERSION=0.25.2 +# renovate: datasource=github-releases depName=containers/omlmd extractVersion=^v(?.*) +ARG OMLMD_VERSION=0.1.5 +# renovate: datasource=github-releases depName=tqdm/tqdm extractVersion=^v(?.*) +ARG TQDM_VERSION=4.66.5 +ARG LLAMA_CPP_SHA=70392f1f81470607ba3afef04aa56c9f65587664 +# renovate: datasource=git-refs depName=ggerganov/whisper.cpp packageName=https://github.com/ggerganov/whisper.cpp gitRef=master versioning=loose type=digest +ARG WHISPER_CPP_SHA=5caa19240d55bfd6ee316d50fbad32c6e9c39528 + +# vulkan-headers vulkan-loader-devel vulkan-tools glslc glslang python3-pip mesa-libOpenCL-$MESA_VER.aarch64 +RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \ + crb enable && \ + dnf install -y epel-release && \ + dnf --enablerepo=ubi-9-appstream-rpms install -y git procps-ng vim \ + dnf-plugins-core python3-dnf-plugin-versionlock cmake gcc-c++ \ + python3-pip python3-argcomplete && \ + dnf clean all && \ + rm -rf /var/cache/*dnf* + +# Install the patched mesa-krunkit drivers +RUN dnf config-manager --add-repo https://copr.fedorainfracloud.org/coprs/slp/mesa-krunkit/repo/epel-9/slp-mesa-krunkit-epel-9.repo && \ + dnf -y install mesa-vulkan-drivers vulkan-loader-devel vulkan-headers vulkan-tools vulkan-loader glslc glslang && \ + dnf clean all + +RUN /usr/bin/python3 --version +RUN pip install "huggingface_hub[cli]==${HUGGINGFACE_HUB_VERSION}" +RUN pip install "omlmd==${OMLMD_VERSION}" +RUN pip install "tqdm==${TQDM_VERSION}" + +ENV GGML_CCACHE=0 + +RUN git clone https://github.com/ggerganov/llama.cpp && \ + cd llama.cpp && \ + git reset --hard ${LLAMA_CPP_SHA} && \ + #cmake -B build -DCMAKE_INSTALL_PREFIX:PATH=/usr -DGGML_CCACHE=0 && \ + cmake -B build -DCMAKE_INSTALL_PREFIX:PATH=/usr -DGGML_CCACHE=0 -DGGML_VULKAN=ON && \ + cmake --build build --config Release -j $(nproc) && \ + cmake --install build && \ + cd / && \ + rm -rf llama.cpp + +RUN git clone https://github.com/ggerganov/whisper.cpp.git && \ + cd whisper.cpp && \ + git reset --hard ${WHISPER_CPP_SHA} && \ + make -j $(nproc) && \ + mv main /usr/bin/whisper-main && \ + mv server /usr/bin/whisper-server && \ + cd / && \ + rm -rf whisper.cpp