Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: #491 support arm64 (Apple Silicon) #659

Merged
merged 30 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
6eb8a7c
Refactor the build to build everything in docker containers so it can…
vanakema Jun 14, 2024
7337cf2
Refactor so architecture is decided based on the -a flag and respecte…
vanakema Jun 17, 2024
d710b2d
Fix issue where migrations would hang
vanakema Jun 18, 2024
6ac896b
Merge branch 'refs/heads/main' into 491-markv-apple-sillicon-support
vanakema Jun 18, 2024
b022dcf
Fix build for make target build-repeater due to the sdk build refactor
vanakema Jun 18, 2024
9ce8586
Refactor Makefile to abstract the docker build from the zarf package …
vanakema Jun 18, 2024
2cd30d7
Fix wrong make target after the refactor
vanakema Jun 18, 2024
8cb5e0e
Fix release.yaml that would break after the refactoring of the docker…
vanakema Jun 18, 2024
16e4738
Change MacOS to the official formatting `macOS`
vanakema Jun 18, 2024
c4eb4e9
remove duplicate .dockerignore entries if they're included in the .gi…
vanakema Jun 18, 2024
94253f4
Fix vllm build after refactor
vanakema Jun 19, 2024
b692e00
Address comments to changes in README.md
vanakema Jun 20, 2024
1869014
refactor vllm Dockerfile to be multistage and use a smaller base image
vanakema Jun 21, 2024
26d86e1
remove old comment
vanakema Jun 21, 2024
e21229c
update leapfrog_ui .dockerignore
vanakema Jun 21, 2024
0f5c60b
Remove unnecessary apt installs in final vllm docker image
vanakema Jun 21, 2024
e7297bc
Merge branch 'refs/heads/main' into 491-markv-apple-sillicon-support
vanakema Jun 21, 2024
5037ab4
Merge branch 'main' into 491-markv-apple-sillicon-support
vanakema Jun 28, 2024
dbd2d83
Merge branch 'refs/heads/main' into 491-markv-apple-sillicon-support
vanakema Jul 2, 2024
0145033
migrate macos instructions to uds dev README.md
vanakema Jul 2, 2024
8cf2d5b
Merge branch 'main' into 491-markv-apple-sillicon-support
vanakema Jul 2, 2024
c918d9f
Address comments
vanakema Jul 2, 2024
c4ce49f
Merge remote-tracking branch 'origin/491-markv-apple-sillicon-support…
vanakema Jul 2, 2024
456d7a8
Merge branch 'main' into 491-markv-apple-sillicon-support
vanakema Jul 3, 2024
35492cd
Merge branch 'main' into 491-markv-apple-sillicon-support
vanakema Jul 8, 2024
1c0deca
Merge branch 'main' of https://github.com/defenseunicorns/leapfrogai …
gscallon Jul 10, 2024
f11aa3d
pull in changes from main and add macos to OS's which have been tested
gscallon Jul 10, 2024
6deffd5
chore: update release workflow to set ARCh and LOCAL_VERSIOn docker b…
YrrepNoj Jul 12, 2024
37206d5
Merge branch 'main' into 491-markv-apple-sillicon-support
YrrepNoj Jul 12, 2024
311c389
Merge branch 'main' into 491-markv-apple-sillicon-support
vanakema Jul 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,10 @@ jobs:
python-version-file: 'pyproject.toml'

- name: Build Repeater
env:
LOCAL_VERSION: dev
run: |
make local-registry
make setup-repeater-deps
docker build -t ghcr.io/defenseunicorns/leapfrogai/repeater:dev packages/repeater
docker tag ghcr.io/defenseunicorns/leapfrogai/repeater:dev localhost:5000/defenseunicorns/leapfrogai/repeater:dev

make docker-repeater
- name: Run Repeater
run: docker run -p 50051:50051 -d --name=repeater ghcr.io/defenseunicorns/leapfrogai/repeater:dev

Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ jobs:
python-version-file: 'pyproject.toml'

- name: Download Python Wheels
run: make setup-api-deps setup-repeater-deps setup-llama-cpp-python-deps setup-vllm-deps setup-text-embeddings-deps setup-whisper-deps
run: make sdk-wheel
YrrepNoj marked this conversation as resolved.
Show resolved Hide resolved

- name: Install Zarf
uses: defenseunicorns/setup-zarf@f95763914e20e493bb5d45d63e30e17138f981d6 # v1.0.0

- name: Build and Publish API
run: |
docker buildx build --platform amd64,arm64 -t ghcr.io/defenseunicorns/leapfrogai/leapfrogai-api:${{ steps.get_version.outputs.version-without-v }} --push packages/api
docker buildx build --platform amd64,arm64 -t ghcr.io/defenseunicorns/leapfrogai/leapfrogai-api:${{ steps.get_version.outputs.version-without-v }} --push -f packages/api/Dockerfile .
docker buildx build --platform amd64,arm64 -t ghcr.io/defenseunicorns/leapfrogai/api-migrations:${{ steps.get_version.outputs.version-without-v }} --push -f Dockerfile.migrations --build-arg="MIGRATIONS_DIR=packages/api/supabase/migrations" .

zarf package create packages/api --set=LEAPFROGAI_IMAGE_VERSION=${{ steps.get_version.outputs.version-without-v }} --architecture amd64 --confirm
Expand All @@ -62,7 +62,7 @@ jobs:

- name: Build and Publish UI
run: |
docker buildx build --platform amd64,arm64 -t ghcr.io/defenseunicorns/leapfrogai/leapfrogai-ui:${{ steps.get_version.outputs.version-without-v }} --push src/leapfrogai_ui
docker buildx build --platform amd64,arm64 -t ghcr.io/defenseunicorns/leapfrogai/leapfrogai-ui:${{ steps.get_version.outputs.version-without-v }} --push -f src/leapfrogai_ui/Dockerfile .
docker buildx build --platform amd64,arm64 -t ghcr.io/defenseunicorns/leapfrogai/ui-migrations:${{ steps.get_version.outputs.version-without-v }} --push -f Dockerfile.migrations --build-arg="MIGRATIONS_DIR=src/leapfrogai_ui/supabase/migrations" .

zarf package create packages/ui --set=IMAGE_VERSION=${{ steps.get_version.outputs.version-without-v }} --architecture amd64 --confirm
Expand All @@ -86,7 +86,7 @@ jobs:

- name: Build and Publish repeater
run: |
docker buildx build --platform amd64,arm64 -t ghcr.io/defenseunicorns/leapfrogai/repeater:${{ steps.get_version.outputs.version-without-v }} --push packages/repeater
docker buildx build --platform amd64,arm64 -t ghcr.io/defenseunicorns/leapfrogai/repeater:${{ steps.get_version.outputs.version-without-v }} --push -f packages/repeater/Dockerfile .

zarf package create packages/repeater --set=IMAGE_VERSION=${{ steps.get_version.outputs.version-without-v }} --architecture amd64 --confirm
zarf package create packages/repeater --set=IMAGE_VERSION=${{ steps.get_version.outputs.version-without-v }} --architecture arm64 --confirm
Expand All @@ -99,7 +99,7 @@ jobs:

- name: Build and Publish llama
run: |
docker buildx build --platform amd64,arm64 -t ghcr.io/defenseunicorns/leapfrogai/llama-cpp-python:${{ steps.get_version.outputs.version-without-v }} --push packages/llama-cpp-python
docker buildx build --platform amd64,arm64 -t ghcr.io/defenseunicorns/leapfrogai/llama-cpp-python:${{ steps.get_version.outputs.version-without-v }} --push -f packages/llama-cpp-python/Dockerfile .

zarf package create packages/llama-cpp-python --set=IMAGE_VERSION=${{ steps.get_version.outputs.version-without-v }} --architecture amd64 --confirm
zarf package create packages/llama-cpp-python --set=IMAGE_VERSION=${{ steps.get_version.outputs.version-without-v }} --architecture arm64 --confirm
Expand All @@ -112,7 +112,7 @@ jobs:

- name: Build and Publish vLLM
run: |
docker buildx build -t ghcr.io/defenseunicorns/leapfrogai/vllm:${{ steps.get_version.outputs.version-without-v }} --push packages/vllm
docker buildx build -t ghcr.io/defenseunicorns/leapfrogai/vllm:${{ steps.get_version.outputs.version-without-v }} --push -f packages/vllm/Dockerfile .

zarf package create packages/vllm --set=IMAGE_VERSION=${{ steps.get_version.outputs.version-without-v }} --confirm

Expand All @@ -123,7 +123,7 @@ jobs:

- name: Build and Publish Text-Embeddings
run: |
docker buildx build --platform amd64,arm64 -t ghcr.io/defenseunicorns/leapfrogai/text-embeddings:${{ steps.get_version.outputs.version-without-v }} --push packages/text-embeddings
docker buildx build --platform amd64,arm64 -t ghcr.io/defenseunicorns/leapfrogai/text-embeddings:${{ steps.get_version.outputs.version-without-v }} --push -f packages/text-embeddings/Dockerfile .

zarf package create packages/text-embeddings --set=IMAGE_VERSION=${{ steps.get_version.outputs.version-without-v }} --architecture amd64 --confirm
zarf package create packages/text-embeddings --set=IMAGE_VERSION=${{ steps.get_version.outputs.version-without-v }} --architecture arm64 --confirm
Expand All @@ -136,7 +136,7 @@ jobs:

- name: Build and Publish whisper
run: |
docker buildx build --platform amd64,arm64 -t ghcr.io/defenseunicorns/leapfrogai/whisper:${{ steps.get_version.outputs.version-without-v }} --push packages/whisper
docker buildx build --platform amd64,arm64 -t ghcr.io/defenseunicorns/leapfrogai/whisper:${{ steps.get_version.outputs.version-without-v }} --push -f packages/whisper/Dockerfile .

zarf package create packages/whisper --set=IMAGE_VERSION=${{ steps.get_version.outputs.version-without-v }} --architecture amd64 --confirm
zarf package create packages/whisper --set=IMAGE_VERSION=${{ steps.get_version.outputs.version-without-v }} --architecture arm64 --confirm
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ build/
.branches
.temp
src/leapfrogai_api/config.yaml
.idea/
/.python-version

# local model and tokenizer files
*.bin
Expand Down
Loading
Loading