Skip to content

Commit

Permalink
feat: use kompute backend for apple silicon
Browse files Browse the repository at this point in the history
Signed-off-by: Sertac Ozercan <[email protected]>
  • Loading branch information
sozercan committed Dec 3, 2024
1 parent 74d4e2f commit adad61e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
9 changes: 4 additions & 5 deletions Dockerfile.base-applesilicon
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
FROM fedora:39@sha256:d63d63fe593749a5e8dbc8152427d40bbe0ece53d884e00e5f3b44859efa5077
FROM fedora:41@sha256:3ec60eb34fa1a095c0c34dd37cead9fd38afb62612d43892fcf1d3425c32bc1e

ARG MESA_VERSION="23.3.5-102"
ARG MESA_VERSION="24.1.2-101"

USER 0

# Install the patched mesa-krunkit drivers
RUN dnf -y install dnf-plugins-core && \
dnf -y copr enable slp/mesa-krunkit && \
dnf -y copr enable slp/mesa-krunkit epel-9-aarch64 && \
dnf -y install \
mesa-vulkan-drivers-$MESA_VERSION \
vulkan-loader-devel vulkan-tools vulkan-loader && \
mesa-vulkan-drivers-$MESA_VERSION.el9.aarch64 && \
dnf clean all
3 changes: 2 additions & 1 deletion pkg/aikit2llb/inference/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const (
distrolessBase = "ghcr.io/sozercan/base:latest"
localAIRepo = "https://github.com/mudler/LocalAI"
localAIVersion = "v2.23.0"
localAICommit = "2859433"
cudaVersion = "12-5"
)

Expand Down Expand Up @@ -158,7 +159,7 @@ func installCuda(c *config.InferenceConfig, s llb.State, merge llb.State) (llb.S
func addLocalAI(c *config.InferenceConfig, s llb.State, merge llb.State, platform specs.Platform) (llb.State, llb.State, error) {
var localAIURL string
if c.Runtime == utils.RuntimeAppleSilicon {
localAIURL = fmt.Sprintf("https://sertacstoragevs.blob.core.windows.net/localai/%[1]s/vulkan/local-ai", localAIVersion)
localAIURL = fmt.Sprintf("https://sertaccdnvs.azureedge.net/localai/%[1]s/kompute/local-ai", localAICommit)
} else {
binaryNames := map[string]string{
utils.PlatformAMD64: "local-ai-Linux-x86_64",
Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const (
APIv1alpha1 = "v1alpha1"

UbuntuBase = "docker.io/library/ubuntu:22.04"
AppleSiliconBase = "ghcr.io/sozercan/applesilicon/base:latest"
AppleSiliconBase = "docker.io/sozercan/base:applesilicon"
CudaDevel = "nvcr.io/nvidia/cuda:12.3.2-devel-ubuntu22.04"

PlatformLinux = "linux"
Expand Down

0 comments on commit adad61e

Please sign in to comment.