Skip to content

Commit

Permalink
Start an Asahi version
Browse files Browse the repository at this point in the history
Asahi has a forked version of mesa while it upstream.

Signed-off-by: Eric Curtin <[email protected]>
  • Loading branch information
ericcurtin committed Nov 5, 2024
1 parent 0048ee3 commit 04d64ff
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
35 changes: 35 additions & 0 deletions container-images/asahi/Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM fedora:41

# renovate: datasource=github-releases depName=huggingface/huggingface_hub extractVersion=^v(?<version>.*)
ARG HUGGINGFACE_HUB_VERSION=0.26.2
# renovate: datasource=github-releases depName=containers/omlmd extractVersion=^v(?<version>.*)
ARG OMLMD_VERSION=0.1.6
# renovate: datasource=github-releases depName=tqdm/tqdm extractVersion=^v(?<version>.*)
ARG TQDM_VERSION=4.66.6
ARG LLAMA_CPP_SHA=1329c0a75e6a7defc5c380eaf80d8e0f66d7da78
# 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=0377596b77a3602e36430320cbe45f8c305ef04a

RUN dnf install -y dnf-plugins-core && \
dnf copr enable -y @asahi/fedora-remix-branding && \
dnf install -y asahi-repos && \
dnf install -y mesa-vulkan-drivers vulkan-headers vulkan-loader-devel \
vulkan-tools spirv-tools glslc glslang git procps-ng vim cmake gcc-c++ \
python3-pip python3-argcomplete clang && \
dnf clean all && \
rm -rf /var/cache/*dnf*

RUN /usr/bin/python3 --version
RUN pip install "huggingface_hub==${HUGGINGFACE_HUB_VERSION}"
RUN pip install "omlmd==${OMLMD_VERSION}"
RUN pip install "tqdm==${TQDM_VERSION}"

COPY ../scripts /scripts
RUN export CC=clang && \
export CXX=clang++ && \
chmod +x /scripts/*.sh && \
/scripts/build_llama_and_whisper.sh "$LLAMA_CPP_SHA" "$WHISPER_CPP_SHA" \
"/usr" "-DGGML_VULKAN=1"

ENV WHISPER_CPP_SHA=${WHISPER_CPP_SHA}
ENV LLAMA_CPP_SHA=${LLAMA_CPP_SHA}
2 changes: 2 additions & 0 deletions test/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ main() {
# verify llama.cpp version matches
grep "$(grep "ARG LLAMA_CPP_SHA=" container-images/ramalama/Containerfile)" \
container-images/cuda/Containerfile
grep "$(grep "ARG LLAMA_CPP_SHA=" container-images/ramalama/Containerfile)" \
container-images/asahi/Containerfile

local os
os="$(uname -s)"
Expand Down

0 comments on commit 04d64ff

Please sign in to comment.