-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial version of aarch64 container with Vulkan
Signed-off-by: Steffen Roecker <[email protected]>
- Loading branch information
Showing
1 changed file
with
52 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(?<version>.*) | ||
ARG HUGGINGFACE_HUB_VERSION=0.25.2 | ||
# renovate: datasource=github-releases depName=containers/omlmd extractVersion=^v(?<version>.*) | ||
ARG OMLMD_VERSION=0.1.5 | ||
# renovate: datasource=github-releases depName=tqdm/tqdm extractVersion=^v(?<version>.*) | ||
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 |