Skip to content

Commit

Permalink
fix: Disable model-serving by default (#207)
Browse files Browse the repository at this point in the history
* fix: Disable model-serving by default

Signed-off-by: Diwank Singh Tomer <[email protected]>

* wip(.github): Run docker build on push just for testing

Signed-off-by: Diwank Singh Tomer <[email protected]>

* feat(.github): Try to cache build steps

Signed-off-by: Diwank Singh Tomer <[email protected]>

* wip(.github): Trying buildx instead of docker compose

Signed-off-by: Diwank Singh Tomer <[email protected]>

* wip(.github): Trying buildx instead of docker compose

Signed-off-by: Diwank Singh Tomer <[email protected]>

* wip(.github): Trying buildx instead of docker compose

Signed-off-by: Diwank Singh Tomer <[email protected]>

* wip(.github): Trying buildx instead of docker compose

Signed-off-by: Diwank Singh Tomer <[email protected]>

* feat(.github): Build and push images using github actions

Signed-off-by: Diwank Singh Tomer <[email protected]>

---------

Signed-off-by: Diwank Singh Tomer <[email protected]>
  • Loading branch information
creatorrr authored Apr 17, 2024
1 parent f5117e4 commit 2d03a1d
Show file tree
Hide file tree
Showing 3 changed files with 134 additions and 18 deletions.
143 changes: 133 additions & 10 deletions .github/workflows/push-to-hub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,48 @@ on:
push:
branches:
- "dev"
- "main"

jobs:
Build-Push-Images-To-Docker-Hub:
Build-Push-Agents-API-Image:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set branch name
id: variables
run: echo "branch_name=$(echo ${GITHUB_REF#refs/heads/} | tr '/' '-')" >> $GITHUB_OUTPUT

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: julepai
password: "${{ secrets.DOCKER_HUB_PASSWORD }}"

- name: Build and push agent images
uses: docker/build-push-action@v4
with:
context: ./agents-api
file: ./agents-api/Dockerfile
push: true
tags: julepai/agents-api:${{ steps.variables.outputs.branch_name }}
cache-from: type=gha
cache-to: type=gha,mode=max

Build-Push-Migration-Image:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set branch name
id: variables
run: echo "branch_name=$(echo ${GITHUB_REF#refs/heads/} | tr '/' '-')" >> $GITHUB_OUTPUT

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

Expand All @@ -22,18 +56,107 @@ jobs:
username: julepai
password: "${{ secrets.DOCKER_HUB_PASSWORD }}"

- uses: KengoTODA/actions-setup-docker-compose@v1
- name: Build and push migration image
uses: docker/build-push-action@v4
with:
version: "2.24.6"
context: ./agents-api
file: ./agents-api/Dockerfile.migration
push: true
tags: julepai/cozo-migrate:${{ steps.variables.outputs.branch_name }}
cache-from: type=gha
cache-to: type=gha,mode=max

Build-Push-Temporal-Image:
runs-on: ubuntu-latest

- name: Build images
run: |
touch .env
docker compose build
steps:
- uses: actions/checkout@v4

- name: Set branch name
id: variables
run: echo "branch_name=$(echo ${GITHUB_REF#refs/heads/} | tr '/' '-')" >> $GITHUB_OUTPUT

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: julepai
password: "${{ secrets.DOCKER_HUB_PASSWORD }}"

- name: Build and push temporal image
uses: docker/build-push-action@v4
with:
context: ./agents-api
file: ./agents-api/Dockerfile.temporal
push: true
tags: julepai/temporal:${{ steps.variables.outputs.branch_name }}
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Push images
run: |
docker compose push
Build-Push-Worker-Image:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set branch name
id: variables
run: echo "branch_name=$(echo ${GITHUB_REF#refs/heads/} | tr '/' '-')" >> $GITHUB_OUTPUT

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: julepai
password: "${{ secrets.DOCKER_HUB_PASSWORD }}"

- name: Build and push worker image
uses: docker/build-push-action@v4
with:
context: ./agents-api
file: ./agents-api/Dockerfile.worker
push: true
tags: julepai/worker:${{ steps.variables.outputs.branch_name }}
cache-from: type=gha
cache-to: type=gha,mode=max

Build-Push-Other-Images:
runs-on: ubuntu-latest
strategy:
matrix:
service-directory:
- gateway
- memory-store
# - model-serving

steps:
- uses: actions/checkout@v4

- name: Set branch name
id: variables
run: echo "branch_name=$(echo ${GITHUB_REF#refs/heads/} | tr '/' '-')" >> $GITHUB_OUTPUT

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: julepai
password: "${{ secrets.DOCKER_HUB_PASSWORD }}"

- name: Build and push images
uses: docker/build-push-action@v4
with:
context: ./${{ matrix.service-directory }}
push: true
tags: julepai/${{ matrix.service-directory }}:${{ steps.variables.outputs.branch_name }}
cache-from: type=gha
cache-to: type=gha,mode=max

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
7 changes: 0 additions & 7 deletions agents-api/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
name: julep-agents-api
version: "3"

# TODO: figure out why this doesn't work
# include:
# - ../model-serving/docker-compose.yml
# - ../memory-store/docker-compose.yml

services:
agents-api:
image: julepai/agents-api:dev
env_file: "../.env"

container_name: agents-api
depends_on:
model-serving:
condition: service_started
memory-store:
condition: service_started
worker:
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ version: "3"
include:
- ./memory-store/docker-compose.yml
- ./model-serving/docker-compose.yml
- ./agents-api/docker-compose.yml
- ./gateway/docker-compose.yml
- ./agents-api/docker-compose.yml

# TODO: Enable after testing
# - ./monitoring/docker-compose.yml

0 comments on commit 2d03a1d

Please sign in to comment.