Skip to content

Commit

Permalink
Add Container Build Action (opea-project#77)
Browse files Browse the repository at this point in the history
Signed-off-by: tylertitsworth <[email protected]>
Signed-off-by: V, Ganesan <[email protected]>
  • Loading branch information
tylertitsworth authored and ganesanintel committed Jun 3, 2024
1 parent d89bebf commit ed1a5aa
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/container-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

name: Container Build
permissions: read-all
on:
workflow_dispatch:
jobs:
# https://github.com/intel/ai-containers/blob/main/.github/action.yml
build-containers:
runs-on: docker
env:
REGISTRY: ${{ secrets.REGISTRY }}
REPO: ${{ secrets.REPO }}
steps:
- uses: step-security/harden-runner@v2
with:
egress-policy: audit
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
path: tei-gaudi
ref: habana-main
repository: huggingface/tei-gaudi
token: ${{ secrets.ACTION_TOKEN }}
- uses: docker/login-action@v3
with:
registry: ${{ secrets.REGISTRY }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build Containers
run: |
docker compose -p ${GITHUB_RUN_NUMBER} up --build --no-start
working-directory: .github/workflows/docker
- name: Print Containers to Summary
run: |
docker compose -p ${GITHUB_RUN_NUMBER} images --format json | jq -r --arg registry "$REGISTRY" '.[] | select(.Repository | contains($registry)) | .Tag' >> $GITHUB_STEP_SUMMARY
- name: Push Containers
run: |
docker compose -p ${GITHUB_RUN_NUMBER} push
working-directory: .github/workflows/docker
- name: Un-Tag Containers
run: |
docker compose -p ${GITHUB_RUN_NUMBER} down --rmi all
working-directory: .github/workflows/docker
- name: Remove Containers
if: always()
run: docker system prune --force
40 changes: 40 additions & 0 deletions .github/workflows/docker/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

services:
embedding-tei-server:
build:
args:
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
no_proxy: ${no_proxy}
context: ../../..
dockerfile: comps/embeddings/langchain/docker/Dockerfile
image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-embedding-tei-server
pull_policy: always
retriever-redis-server:
build:
dockerfile: comps/retrievers/langchain/docker/Dockerfile
extends: embedding-tei-server
image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-retriever-redis-server
reranking-tei-server:
build:
dockerfile: comps/reranks/langchain/docker/Dockerfile
extends: embedding-tei-server
image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-reranking-tei-server
llm-tgi-server:
build:
dockerfile: comps/llms/langchain/docker/Dockerfile
extends: embedding-tei-server
image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-llm-tgi-server
dataprep-redis-server:
build:
dockerfile: comps/dataprep/redis/docker/Dockerfile
extends: embedding-tei-server
image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-dataprep-redis-server
tei-gaudi:
build:
context: ../../../tei-gaudi
dockerfile: Dockerfile-hpu
extends: embedding-tei-server
image: ${REGISTRY}/${REPO}:b-${GITHUB_RUN_NUMBER:-0}-tei-gaudi

0 comments on commit ed1a5aa

Please sign in to comment.