Skip to content

Commit

Permalink
Zep CE v1 (#361)
Browse files Browse the repository at this point in the history
* delete all old files

* v1

* fix build path

* chore: Update release action and add depot.json

* fix lint action

* fix: docker compose file names

* README and depot config

* zep cmd

* fix readme

---------

Co-authored-by: paulpaliychuk <[email protected]>
  • Loading branch information
MrTravisB and paul-paliychuk authored Sep 25, 2024
1 parent 12a69d7 commit 411142c
Show file tree
Hide file tree
Showing 327 changed files with 8,381 additions and 170,266 deletions.
1 change: 0 additions & 1 deletion .cursorignore

This file was deleted.

42 changes: 5 additions & 37 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,52 +11,20 @@ jobs:
runs-on: ubuntu-4c-16GB-150GB
container: debian:bullseye-slim
environment: build-test
services:
postgres:
image: ghcr.io/getzep/postgres:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
nlp:
image: ghcr.io/getzep/zep-nlp-server:latest
options: >-
--health-cmd "timeout 10s bash -c ':> /dev/tcp/127.0.0.1/5557' || exit 1"
--health-interval 10s
--health-timeout 10s
--health-retries 5
steps:
- uses: actions/checkout@v3

- uses: actions/checkout@v4
- name: install certs and build-essential (required by CGO)
run: apt-get update && apt-get install -y ca-certificates build-essential

- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
go-version: '^1.21'

go-version: '^1.22'
- name: Cache Go modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build
run: go build -v ./...

- name: Test
run: CGO_ENABLED=1 go test -tags=testutils -race -p 1 -v ./...
env:
ZEP_LOG_LEVEL: 'info'
ZEP_OPENAI_API_KEY: ${{ secrets.ZEP_OPENAI_API_KEY }}
ZEP_ANTHROPIC_API_KEY: ${{ secrets.ZEP_ANTHROPIC_API_KEY }}
ZEP_STORE_POSTGRES_DSN: 'postgres://postgres:postgres@postgres:5432/?sslmode=disable'
ZEP_NLP_SERVER_URL: 'http://nlp:5557'
run: go build -v ./src/...
98 changes: 0 additions & 98 deletions .github/workflows/docker-postgres-build.yml

This file was deleted.

83 changes: 0 additions & 83 deletions .github/workflows/docker-publish-cloud.yml

This file was deleted.

96 changes: 45 additions & 51 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -1,82 +1,76 @@
name: Zep Server Docker Build and Publish

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

on:
push:
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
workflow_dispatch:
inputs:
tag:
description: 'Tag to build and publish'
required: true
tag:
description: 'Tag to build and publish'
required: true
push_as_latest:
description: 'Also push as latest?'
type: boolean
default: false

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}

REGISTRY: docker.io
IMAGE_NAME: zepai/zep

jobs:
build:

docker-image:
environment:
name: release
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write


# if triggered manually via dispatch, use the provided tag name
# otherwise, use the event ref
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout repo for tag push
if: github.event_name == 'push'
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.tag || github.ref }}
ref: ${{ github.ref }}

# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2
- name: Checkout repo for manual trigger
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v4

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v2.1.0
- name: Set up Depot CLI
uses: depot/setup-action@v1

- name: Login to DockerHub
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Extract version from tag
id: get_version
run: |
VERSION=${{ github.event.inputs.tag || github.ref_name }}
VERSION=${VERSION#v} # Remove leading 'v' if present
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "major_minor=${VERSION%.*}" >> $GITHUB_OUTPUT
echo "major=${VERSION%%.*}" >> $GITHUB_OUTPUT
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/[email protected]
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=match,pattern=v(.*-beta),group=1
type=match,pattern=v.*-(beta),group=1
type=raw,value=latest,enable=${{ (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-')) || (github.event_name == 'workflow_dispatch' && github.event.inputs.push_as_latest == 'true') }}
type=raw,value=${{ steps.get_version.outputs.version }}
type=raw,value=${{ steps.get_version.outputs.major_minor }}
type=raw,value=${{ steps.get_version.outputs.major }}
- name: Set up Depot CLI
uses: depot/setup-action@v1
- name: Depot build and push image
- name: Build and push
uses: depot/build-push-action@v1
with:
project: v9jv1mlpwc
context: .
context: ${{ github.workspace }}
push: true
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags || env.TAGS }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
file: Dockerfile.ce
Loading

0 comments on commit 411142c

Please sign in to comment.