-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #430 from containers/llama-cpp-python-server
Install llama-cpp-python[server]
- Loading branch information
Showing
6 changed files
with
79 additions
and
101 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 |
---|---|---|
@@ -1,25 +1,11 @@ | ||
FROM fedora:41 | ||
|
||
# renovate: datasource=github-releases depName=containers/omlmd extractVersion=^v(?<version>.*) | ||
ARG OMLMD_VERSION=0.1.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=31aea563a83803c710691fed3e8d700e06ae6788 | ||
|
||
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 && \ | ||
dnf clean all && \ | ||
rm -rf /var/cache/*dnf* | ||
|
||
RUN /usr/bin/python3 --version | ||
RUN pip install "omlmd==${OMLMD_VERSION}" | ||
|
||
COPY ../scripts /scripts | ||
RUN chmod +x /scripts/*.sh && \ | ||
/scripts/build_llama_and_whisper.sh "$LLAMA_CPP_SHA" "$WHISPER_CPP_SHA" \ | ||
"/usr" "-DGGML_VULKAN=1" | ||
/scripts/build_llama_and_whisper.sh "asahi" "$LLAMA_CPP_SHA" \ | ||
"$WHISPER_CPP_SHA" "/usr" "-DGGML_VULKAN=1" | ||
|
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
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 |
---|---|---|
@@ -1,42 +1,13 @@ | ||
FROM registry.access.redhat.com/ubi9/ubi:9.4-1214.1729773476 | ||
|
||
# renovate: datasource=github-releases depName=containers/omlmd extractVersion=^v(?<version>.*) | ||
ARG OMLMD_VERSION=0.1.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=31aea563a83803c710691fed3e8d700e06ae6788 | ||
|
||
# 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 copr enable -y slp/mesa-krunkit epel-9-$(uname -m) && \ | ||
dnf install -y mesa-vulkan-drivers-23.3.3-102.el9 \ | ||
vulkan-headers vulkan-loader-devel vulkan-tools spirv-tools glslc && \ | ||
dnf clean all && \ | ||
rm -rf /var/cache/*dnf* | ||
|
||
RUN /usr/bin/python3 --version | ||
RUN pip install "omlmd==${OMLMD_VERSION}" | ||
|
||
RUN dnf config-manager --add-repo \ | ||
https://mirror.stream.centos.org/9-stream/AppStream/$(uname -m)/os/ | ||
RUN curl --retry 8 --retry-all-errors -o \ | ||
/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-Official \ | ||
http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-Official && \ | ||
cat /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-Official | ||
RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-Official | ||
RUN dnf install -y glslang && \ | ||
dnf clean all && \ | ||
rm -rf /var/cache/*dnf* | ||
|
||
COPY ../scripts /scripts | ||
RUN chmod +x /scripts/*.sh && \ | ||
/scripts/build_llama_and_whisper.sh "$LLAMA_CPP_SHA" "$WHISPER_CPP_SHA" \ | ||
"/usr" "-DGGML_KOMPUTE=1" | ||
/scripts/build_llama_and_whisper.sh "ramalama" "$LLAMA_CPP_SHA" \ | ||
"$WHISPER_CPP_SHA" "/usr" "-DGGML_KOMPUTE=1" | ||
|
||
ENV WHISPER_CPP_SHA=${WHISPER_CPP_SHA} | ||
ENV LLAMA_CPP_SHA=${LLAMA_CPP_SHA} |
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 |
---|---|---|
@@ -1,27 +1,12 @@ | ||
FROM quay.io/ramalama/ramalama:latest | ||
|
||
RUN /usr/bin/python3 --version | ||
|
||
ARG ROCM_VERSION=6.2.2 | ||
ARG AMDGPU_VERSION=6.2.2 | ||
|
||
COPY rocm/amdgpu.repo /etc/yum.repos.d/ | ||
COPY rocm/rocm.repo /etc/yum.repos.d/ | ||
|
||
RUN dnf config-manager --add-repo \ | ||
https://mirror.stream.centos.org/9-stream/AppStream/$(uname -m)/os/ | ||
RUN curl --retry 8 --retry-all-errors -o \ | ||
/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-Official \ | ||
http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-Official && \ | ||
cat /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-Official | ||
RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-Official | ||
|
||
COPY scripts /scripts | ||
RUN dnf install -y rocm-dev hipblas-devel rocblas-devel && \ | ||
dnf clean all && \ | ||
chmod +x /scripts/*.sh && \ | ||
/scripts/build_llama_and_whisper.sh "$LLAMA_CPP_SHA" "$WHISPER_CPP_SHA" \ | ||
"/usr" "-DGGML_HIPBLAS=1" && \ | ||
rm -rf /var/cache/*dnf* /opt/rocm-*/lib/llvm \ | ||
/opt/rocm-*/lib/rocblas/library/*gfx9* | ||
RUN chmod +x /scripts/*.sh && \ | ||
/scripts/build_llama_and_whisper.sh "rocm" "$LLAMA_CPP_SHA" \ | ||
"$WHISPER_CPP_SHA" "/usr" "-DGGML_HIPBLAS=1" | ||
|
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
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