Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

Create multiplatform docker images (#2254)

ali sayyah6ec36303e541
diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml
index b8cbd982b..189489614 100644
--- a/.github/workflows/docker-image.yml
+++ b/.github/workflows/docker-image.yml
@@ -6,11 +6,9 @@ on:
workflow_dispatch:
jobs:
-
build:
-
runs-on: ubuntu-latest
-
+
steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
@@ -19,19 +17,25 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: actions/checkout@v3
- - name: Build and push the Docker image (memgpt)
- run: |
- # Extract the version number from pyproject.toml using awk
- CURRENT_VERSION=$(awk -F '"' '/version =/ { print $2 }' pyproject.toml | head -n 1)
- docker build . --file Dockerfile --tag memgpt/letta:$CURRENT_VERSION --tag memgpt/letta:latest
- docker push memgpt/letta:$CURRENT_VERSION
- docker push memgpt/letta:latest
+
+ - name: Set up QEMU
+ uses: docker/setup-qemu-action@v3
- - uses: actions/checkout@v3
- - name: Build and push the Docker image (letta)
- run: |
- # Extract the version number from pyproject.toml using awk
- CURRENT_VERSION=$(awk -F '"' '/version =/ { print $2 }' pyproject.toml | head -n 1)
- docker build . --file Dockerfile --tag letta/letta:$CURRENT_VERSION --tag letta/letta:latest
- docker push letta/letta:$CURRENT_VERSION
- docker push letta/letta:latest
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v3
+
+ - name: Extract version number
+ id: extract_version
+ run: echo "CURRENT_VERSION=$(awk -F '\"' '/version =/ { print $2 }' pyproject.toml | head -n 1)" >> $GITHUB_ENV
+
+ - name: Build and push
+ uses: docker/build-push-action@v6
+ with:
+ platforms: linux/amd64,linux/arm64
+ push: true
+ tags: |
+ letta/letta:${{ env.CURRENT_VERSION }}
+ letta/letta:latest
+ memgpt/letta:${{ env.CURRENT_VERSION }}
+ memgpt/letta:latest
+