Skip to content

Commit 95d7d01

Browse files
committed
CI: try to build backend
Signed-off-by: Ettore Di Giacinto <[email protected]>
1 parent bfcfc1b commit 95d7d01

File tree

2 files changed

+106
-0
lines changed

2 files changed

+106
-0
lines changed

.github/workflows/backend.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,3 +1119,89 @@ jobs:
11191119
for tag in $(echo "${{ steps.quaymeta.outputs.tags }}" | tr ',' '\n'); do
11201120
crane push llama-cpp.tar $tag
11211121
done
1122+
mlx-darwin:
1123+
runs-on: macOS-14
1124+
strategy:
1125+
matrix:
1126+
go-version: ['1.24.x']
1127+
steps:
1128+
- name: Clone
1129+
uses: actions/checkout@v5
1130+
with:
1131+
submodules: true
1132+
- name: Setup Go ${{ matrix.go-version }}
1133+
uses: actions/setup-go@v5
1134+
with:
1135+
go-version: ${{ matrix.go-version }}
1136+
cache: false
1137+
# You can test your matrix by printing the current Go version
1138+
- name: Display Go version
1139+
run: go version
1140+
- name: Dependencies
1141+
run: |
1142+
brew install protobuf grpc make protoc-gen-go protoc-gen-go-grpc libomp llvm
1143+
- name: Build mlx-darwin
1144+
run: |
1145+
make protogen-go
1146+
make backends/mlx
1147+
- name: Upload mlx.tar
1148+
uses: actions/upload-artifact@v4
1149+
with:
1150+
name: mlx-tar
1151+
path: backend-images/mlx.tar
1152+
mlx-darwin-publish:
1153+
needs: mlx-darwin
1154+
if: github.event_name != 'pull_request'
1155+
runs-on: ubuntu-latest
1156+
steps:
1157+
- name: Download mlx.tar
1158+
uses: actions/download-artifact@v5
1159+
with:
1160+
name: mlx-tar
1161+
path: .
1162+
- name: Install crane
1163+
run: |
1164+
curl -L https://github.com/google/go-containerregistry/releases/latest/download/go-containerregistry_Linux_x86_64.tar.gz | tar -xz
1165+
sudo mv crane /usr/local/bin/
1166+
- name: Log in to DockerHub
1167+
run: |
1168+
echo "${{ secrets.DOCKERHUB_PASSWORD }}" | crane auth login docker.io -u "${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin
1169+
- name: Log in to quay.io
1170+
run: |
1171+
echo "${{ secrets.LOCALAI_REGISTRY_PASSWORD }}" | crane auth login quay.io -u "${{ secrets.LOCALAI_REGISTRY_USERNAME }}" --password-stdin
1172+
- name: Docker meta
1173+
id: meta
1174+
uses: docker/metadata-action@v5
1175+
with:
1176+
images: |
1177+
localai/localai-backends
1178+
tags: |
1179+
type=ref,event=branch
1180+
type=semver,pattern={{raw}}
1181+
type=sha
1182+
flavor: |
1183+
latest=auto
1184+
suffix=-metal-darwin-arm64-mlx,onlatest=true
1185+
- name: Docker meta
1186+
id: quaymeta
1187+
uses: docker/metadata-action@v5
1188+
with:
1189+
images: |
1190+
quay.io/go-skynet/local-ai-backends
1191+
tags: |
1192+
type=ref,event=branch
1193+
type=semver,pattern={{raw}}
1194+
type=sha
1195+
flavor: |
1196+
latest=auto
1197+
suffix=-metal-darwin-arm64-mlx,onlatest=true
1198+
- name: Push Docker image (DockerHub)
1199+
run: |
1200+
for tag in $(echo "${{ steps.meta.outputs.tags }}" | tr ',' '\n'); do
1201+
crane push mlx.tar $tag
1202+
done
1203+
- name: Push Docker image (Quay)
1204+
run: |
1205+
for tag in $(echo "${{ steps.quaymeta.outputs.tags }}" | tr ',' '\n'); do
1206+
crane push mlx.tar $tag
1207+
done

backend/index.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,21 @@
127127
nvidia: "cuda12-vllm"
128128
amd: "rocm-vllm"
129129
intel: "intel-vllm"
130+
- &mlx
131+
name: "mlx"
132+
uri: "quay.io/go-skynet/local-ai-backends:latest-metal-darwin-arm64-mlx"
133+
icon: https://avatars.githubusercontent.com/u/102832242?s=200&v=4
134+
urls:
135+
- https://github.com/ml-explore/mlx-lm
136+
mirrors:
137+
- localai/localai-backends:latest-metal-darwin-arm64-mlx
138+
license: MIT
139+
description: |
140+
Run LLMs with MLX
141+
tags:
142+
- text-to-text
143+
- LLM
144+
- MLX
130145
- &rerankers
131146
name: "rerankers"
132147
alias: "rerankers"
@@ -371,6 +386,11 @@
371386
- text-to-speech
372387
- TTS
373388
license: apache-2.0
389+
- !!merge <<: *mlx
390+
name: "mlx-development"
391+
uri: "quay.io/go-skynet/local-ai-backends:master-metal-darwin-arm64-mlx"
392+
mirrors:
393+
- localai/localai-backends:master-metal-darwin-arm64-mlx
374394
- !!merge <<: *kitten-tts
375395
name: "kitten-tts-development"
376396
uri: "quay.io/go-skynet/local-ai-backends:master-kitten-tts"

0 commit comments

Comments
 (0)