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

fix: Disable model-serving by default #207

Merged
merged 8 commits into from
Apr 17, 2024
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
Loading