Skip to content

Commit

Permalink
feat: Create and push docker images to hub (#198)
Browse files Browse the repository at this point in the history
* feat: Create and push docker images to hub

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

* feat: Github action for building and pushing docker images to hub

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

* fix(.github): Use matrix strategy for docker build & push

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

* fix(.github): Do build/push manually instead of custom action

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

* fix(.github): Set docker compose latest version

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

* fix(.github): Touch .env

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

* fix(.github): Simplify env_file

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

* fix(.github): Fix agents-api docker-compose file

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

* fix(.github): Fix docker-build github action stuff

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 62201dd commit 6799468
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 39 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/push-to-hub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build and push images to docker hub on merge to dev
run-name: ${{ github.actor }} is building and pushing images to docker hub

on:
push:
branches:
- "dev"

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

steps:
- uses: actions/checkout@v4

- 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 }}"

- uses: KengoTODA/actions-setup-docker-compose@v1
with:
version: "2.24.6"

- name: Build images
run: |
touch .env
docker compose build
- name: Push images
run: |
docker compose push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
37 changes: 13 additions & 24 deletions agents-api/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
name: julep-agents-api
version: "3"

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

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

container_name: agents-api
depends_on:
Expand Down Expand Up @@ -40,11 +38,8 @@ services:
path: Dockerfile

worker:
env_file:
- path: .env
required: false
- path: ../.env
required: true
image: julepai/worker:dev
env_file: "../.env"

build:
context: .
Expand Down Expand Up @@ -87,12 +82,9 @@ services:
capabilities: [gpu]

temporal:
image: julepai/temporal:dev
container_name: temporal
env_file:
- path: .env
required: false
- path: ../.env
required: true
env_file: "../.env"

build:
context: .
Expand All @@ -108,11 +100,8 @@ services:
path: Dockerfile.temporal

cozo-migrate:
env_file:
- path: .env
required: false
- path: ../.env
required: true
image: julepai/cozo-migrate:dev
env_file: "../.env"

container_name: cozo-migrate
depends_on:
Expand Down
7 changes: 2 additions & 5 deletions gateway/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@ include:

services:
gateway:
env_file:
- path: .env
required: false
- path: ../.env
required: true
image: julepai/gateway:dev
env_file: "../.env"

environment:
- GATEWAY_PORT=80
Expand Down
7 changes: 2 additions & 5 deletions memory-store/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ version: "3"

services:
memory-store:
env_file:
- path: .env
required: false
- path: ../.env
required: true
image: julepai/memory-store:dev
env_file: "../.env"
environment:
- COZO_AUTH_TOKEN=${COZO_AUTH_TOKEN}
- COZO_PORT=${COZO_PORT}
Expand Down
8 changes: 3 additions & 5 deletions model-serving/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ name: julep-model-serving

services:
model-serving:
env_file:
- path: .env
required: false
- path: ../.env
required: true
image: julepai/model-serving:dev
env_file: "../.env"

environment:
- MODEL_API_KEY=${MODEL_API_KEY}
- MODEL_API_KEY_HEADER_NAME=${MODEL_API_KEY_HEADER_NAME}
Expand Down

0 comments on commit 6799468

Please sign in to comment.