diff --git a/.github/workflows/release-base.yaml b/.github/workflows/release-base.yaml index a0da4170..2c65a254 100644 --- a/.github/workflows/release-base.yaml +++ b/.github/workflows/release-base.yaml @@ -47,17 +47,17 @@ jobs: - name: Set runtime variables for matrix run: | if [ ${{ matrix.runtime }} == "base" ]; then - export PLATFORMS="linux/amd64,linux/arm64" - export FILE="Dockerfile.base" - export TAG="ghcr.io/sozercan/base:latest" - export CACHE_FROM="type=gha,scope=base" - export CACHE_TO="type=gha,scope=base,mode=max" + echo PLATFORMS="linux/amd64,linux/arm64" >> $GITHUB_ENV + echo FILE="Dockerfile.base" >> $GITHUB_ENV + echo TAG="ghcr.io/sozercan/base:latest" >> $GITHUB_ENV + echo CACHE_FROM="type=gha,scope=base" >> $GITHUB_ENV + echo CACHE_TO="type=gha,scope=base,mode=max" >> $GITHUB_ENV elif [ ${{ matrix.runtime }} == "applesilicon" ]; then - export PLATFORMS="linux/arm64" - export FILE="Dockerfile.base-applesilicon" - export TAG="ghcr.io/sozercan/applesilicon/base:latest" - export CACHE_FROM="type=gha,scope=base-applesilicon" - export CACHE_TO="type=gha,scope=base-applesilicon,mode=max" + echo PLATFORMS="linux/arm64" >> $GITHUB_ENV + echo FILE="Dockerfile.base-applesilicon" >> $GITHUB_ENV + echo TAG="ghcr.io/sozercan/applesilicon/base:latest" >> $GITHUB_ENV + echo CACHE_FROM="type=gha,scope=base-applesilicon" >> $GITHUB_ENV + echo CACHE_TO="type=gha,scope=base-applesilicon,mode=max" >> $GITHUB_ENV fi - name: Build and push diff --git a/.github/workflows/test-podman-applesilicon.yaml b/.github/workflows/test-podman-applesilicon.yaml index 5916c6db..b0ea4590 100644 --- a/.github/workflows/test-podman-applesilicon.yaml +++ b/.github/workflows/test-podman-applesilicon.yaml @@ -18,25 +18,30 @@ jobs: # use default docker driver builder with containerd image store for local aikit image # these must be setup before running this test - - run: docker buildx use default + - run: docker buildx use desktop-linux - name: build aikit run: | docker buildx build . -t aikit:test \ --load --provenance=false --progress plain - - name: build test model + - name: build and push test model run: | - docker buildx build . -t testmodel:test \ + docker buildx build . -t sozercan/testmodel:test \ -f test/aikitfile-llama.yaml \ - --load --provenance=false --progress plain \ - --build-arg="runtime=applesilicon" + --provenance=false --progress plain \ + --build-arg="runtime=applesilicon" \ + --push - name: list images run: docker images - name: run test model - run: podman run --name testmodel -d --rm --device /dev/dri -p 8080:8080 --pull always testmodel:test + run: | + podman run --name testmodel -d --rm -p 8080:8080 \ + --device /dev/dri \ + --pull always \ + sozercan/testmodel:test - name: run test (gguf) run: | @@ -58,8 +63,11 @@ jobs: - run: podman stop testmodel if: always() - - run: podman system prune -a -f --volumes || true - if: always() + # - name: prune + # run: | + # docker system prune -a -f --volumes || true + # podman system prune -a -f --volumes || true + # if: always() - name: publish test artifacts if: always() diff --git a/Dockerfile.base-applesilicon b/Dockerfile.base-applesilicon index fcc101ae..64595de9 100644 --- a/Dockerfile.base-applesilicon +++ b/Dockerfile.base-applesilicon @@ -1,12 +1,13 @@ -ARG MESA_VERSION=23.3.5-102 - FROM fedora:39@sha256:d63d63fe593749a5e8dbc8152427d40bbe0ece53d884e00e5f3b44859efa5077 + +ARG MESA_VERSION="23.3.5-102" + USER 0 # Install the patched mesa-krunkit drivers RUN dnf -y install dnf-plugins-core && \ dnf -y copr enable slp/mesa-krunkit && \ dnf -y install \ - mesa-vulkan-drivers-${MESA_VERSION} \ + mesa-vulkan-drivers-$MESA_VERSION \ vulkan-loader-devel vulkan-tools vulkan-loader && \ dnf clean all diff --git a/README.md b/README.md index 9ca50ec8..b4d0a0dc 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,7 @@ If it doesn't include a specific model, you can always [create your own images]( > [!NOTE] > AIKit supports both AMD64 and ARM64 CPUs. You can run the same command on either architecture, and Docker will automatically pull the correct image for your CPU. +> > Depending on your CPU capabilities, AIKit will automatically select the most optimized instruction set. | Model | Optimization | Parameters | Command | Model Name | License | @@ -100,6 +101,7 @@ If it doesn't include a specific model, you can always [create your own images]( > [!NOTE] > To enable GPU acceleration, please see [GPU Acceleration](https://sozercan.github.io/aikit/docs/gpu). +> > Please note that only difference between CPU and GPU section is the `--gpus all` flag in the command to enable GPU acceleration. | Model | Optimization | Parameters | Command | Model Name | License | @@ -118,7 +120,9 @@ If it doesn't include a specific model, you can always [create your own images]( > [!NOTE] > To enable GPU acceleration on Apple Silicon, please see [Podman Desktop documentation](https://podman-desktop.io/docs/podman/gpu). +> > Apple Silicon is an _experimental_ runtime and it may change in the future. This runtime is specific to Apple Silicon only, and it will not work as expected on other architectures, including Intel Macs. +> > Only `gguf` models are supported on Apple Silicon. | Model | Optimization | Parameters | Command | Model Name | License |