Skip to content

Commit

Permalink
Revert "Fix dockerfile check logical (opea-project#671)"
Browse files Browse the repository at this point in the history
This reverts commit 887ca75.
  • Loading branch information
HarshaRamayanam committed Sep 11, 2024
1 parent 887ca75 commit 7aedd69
Show file tree
Hide file tree
Showing 12 changed files with 94 additions and 78 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/docker/compose/dataprep-compose-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ services:
build:
dockerfile: comps/dataprep/multimodal/redis/langchain/Dockerfile
image: ${REGISTRY:-opea}/dataprep-redis:${TAG:-latest}
dataprep-vdms:
build:
dockerfile: comps/dataprep/vdms/multimodal_langchain/Dockerfile
image: ${REGISTRY:-opea}/dataprep-vdms:${TAG:-latest}
dataprep-vdmsxx: #need to rename
build:
dockerfile: comps/dataprep/vdms/langchain/Dockerfile
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/docker/compose/dataprep-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,3 @@ services:
build:
dockerfile: comps/dataprep/redis/langchain_ray/Dockerfile
image: ${REGISTRY:-opea}/dataprep-on-ray-redis:${TAG:-latest}
dataprep-vdms:
build:
dockerfile: comps/dataprep/vdms/multimodal_langchain/Dockerfile
image: ${REGISTRY:-opea}/dataprep-vdms:${TAG:-latest}
4 changes: 4 additions & 0 deletions .github/workflows/docker/compose/embeddings-compose-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ services:
build:
dockerfile: comps/embeddings/tei/llama_index/Dockerfile
image: ${REGISTRY:-opea}/embedding-tei-llama-index:${TAG:-latest}
embedding-multimodal:
build:
dockerfile: comps/embeddings/multimodal_clip/Dockerfile
image: ${REGISTRY:-opea}/embedding-multimodal:${TAG:-latest}
bridgetower-embedder:
build:
dockerfile: comps/embeddings/multimodal/bridgetower/Dockerfile
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/docker/compose/embeddings-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,3 @@ services:
build:
dockerfile: comps/embeddings/tei/langchain/Dockerfile
image: ${REGISTRY:-opea}/embedding-tei:${TAG:-latest}
embedding-multimodal:
build:
dockerfile: comps/embeddings/multimodal_clip/Dockerfile
image: ${REGISTRY:-opea}/embedding-multimodal:${TAG:-latest}
8 changes: 8 additions & 0 deletions .github/workflows/docker/compose/lvms-compose-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,11 @@ services:
build:
dockerfile: comps/lvms/llava/dependency/Dockerfile.intel_hpu
image: ${REGISTRY:-opea}/llava-hpu:${TAG:-latest}
lvm-video-llama:
build:
dockerfile: comps/lvms/video-llama/Dockerfile
image: ${REGISTRY:-opea}/lvm-video-llama:${TAG:-latest}
video-llama-lvm-server:
build:
dockerfile: comps/lvms/video-llama/dependency/Dockerfile
image: ${REGISTRY:-opea}/video-llama-lvm-server:${TAG:-latest}
8 changes: 0 additions & 8 deletions .github/workflows/docker/compose/lvms-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,3 @@ services:
build:
dockerfile: comps/lvms/tgi-llava/Dockerfile
image: ${REGISTRY:-opea}/lvm-tgi:${TAG:-latest}
lvm-video-llama:
build:
dockerfile: comps/lvms/video-llama/Dockerfile
image: ${REGISTRY:-opea}/lvm-video-llama:${TAG:-latest}
video-llama-lvm-server:
build:
dockerfile: comps/lvms/video-llama/dependency/Dockerfile
image: ${REGISTRY:-opea}/video-llama-lvm-server:${TAG:-latest}
4 changes: 4 additions & 0 deletions .github/workflows/docker/compose/reranks-compose-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ services:
build:
dockerfile: comps/reranks/mosec/langchain/Dockerfile
image: ${REGISTRY:-opea}/reranking-langchain-mosec:${TAG:-latest}
reranking-videoragqna:
build:
dockerfile: comps/reranks/video-rag-qna/Dockerfile
image: ${REGISTRY:-opea}/reranking-videoragqna:${TAG:-latest}
4 changes: 0 additions & 4 deletions .github/workflows/docker/compose/reranks-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,3 @@ services:
build:
dockerfile: comps/reranks/tei/Dockerfile
image: ${REGISTRY:-opea}/reranking-tei:${TAG:-latest}
reranking-videoragqna:
build:
dockerfile: comps/reranks/video-rag-qna/Dockerfile
image: ${REGISTRY:-opea}/reranking-videoragqna:${TAG:-latest}
4 changes: 4 additions & 0 deletions .github/workflows/docker/compose/retrievers-compose-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ services:
build:
dockerfile: comps/retrievers/multimodal/redis/langchain/Dockerfile
image: ${REGISTRY:-opea}/multimodal-retriever-redis:${TAG:-latest}
retriever-vdms:
build:
dockerfile: comps/retrievers/vdms/langchain/Dockerfile
image: ${REGISTRY:-opea}/retriever-vdms:${TAG:-latest}
4 changes: 0 additions & 4 deletions .github/workflows/docker/compose/retrievers-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,3 @@ services:
build:
dockerfile: comps/retrievers/qdrant/haystack/Dockerfile
image: ${REGISTRY:-opea}/retriever-qdrant:${TAG:-latest}
retriever-vdms:
build:
dockerfile: comps/retrievers/vdms/langchain/Dockerfile
image: ${REGISTRY:-opea}/retriever-vdms:${TAG:-latest}
10 changes: 10 additions & 0 deletions .github/workflows/docker/compose/tts-compose-cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

# this file should be run in the root of the repo
# images used by GenAIExamples: reranking-tei
services:
tts: #need to rename
build:
dockerfile: comps/tts/Dockerfile
image: ${REGISTRY:-opea}/tts:${TAG:-latest}
114 changes: 60 additions & 54 deletions .github/workflows/pr-dockerfile-path-scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,60 +56,66 @@ jobs:
exit 1
fi
- name: Check Dockerfile path included in image build yaml
if: always()
run: |
set -e
shopt -s globstar
no_add="FALSE"
cd ${{github.workspace}}
Dockerfiles=$(find ./comps -name '*Dockerfile*'|sed 's/^\.\///')
if [ -n "$Dockerfiles" ]; then
for Dockerfile in $Dockerfiles; do
service=$(echo "$Dockerfile" | awk -F '/' '{print $2}')
if grep -q "$Dockerfile" ../GenAIExamples/**/*build.yaml*; then
mode="" #CI
else
mode="-cd" #CD
fi
yaml_file=${{github.workspace}}/.github/workflows/docker/compose/"$service"-compose
if ! grep -q "$Dockerfile" "$yaml_file"*yaml; then
echo "AR: Update $Dockerfile to .github/workflows/docker/compose/"$service"-compose"$mode".yaml."
no_add="TRUE"
fi
done
fi
if [[ "$no_add" == "TRUE" ]]; then
exit 1
fi
- name: Check Dockerfile inside image build yaml exist in code
if: always()
run: |
shopt -s globstar
no_exist="FALSE"
cd ${{github.workspace}}
yamls=$(find .github/workflows/docker/compose/ -name '*.yaml')
if [ -n "$yamls" ]; then
for yaml in $yamls; do
dockerfiles=$(grep 'dockerfile:' "$yaml"|sed 's/dockerfile: //')
for dockerfile in $dockerfiles; do
if [[ "$dockerfile" == *"comps/"* ]]; then
if ! [ -e "$dockerfile" ]; then
# cat "$yaml"
echo "AR: The dockerfile path "$dockerfile" in "$yaml" does not exist, remove or update it."
no_exist="TRUE"
fi
fi
done
done
fi
if [[ "$no_exist" == "TRUE" ]]; then
exit 1
fi
# - name: Check all Dockerfile mode and if it exists in yaml
# if: always()
# run: |
# set -e
# shopt -s globstar
# no_add="FALSE"
# cd ${{github.workspace}}
# Dockerfiles=$(find ./comps -name '*Dockerfile*'|sed 's/^\.\///')
# if [ -n "$Dockerfiles" ]; then
# for Dockerfile in $Dockerfiles; do
# service=$(echo "$Dockerfile" | awk -F '/' '{print $2}')
# if grep -q "$Dockerfile" ../GenAIExamples/**/*build.yaml*; then
# mode="" #CI
# else
# mode="-cd" #CD
# fi
#
# yaml_file=${{github.workspace}}/.github/workflows/docker/compose/$service'-compose'$mode'.yaml'
# if [ -e "$yaml_file" ]; then
# # check service yaml if exist
# if ! grep -q "$Dockerfile" "$yaml_file"; then
# echo "AR: Update $Dockerfile to .github/workflows/docker/compose/"$service"-compose"$mode".yaml."
# no_add="TRUE"
# fi
# else
# echo "AR: Create a new compose file .github/workflows/docker/compose/"$service"-compose"$mode".yaml for $Dockerfile and fill it in."
# no_add="TRUE"
# fi
# done
# fi
#
# if [[ "$no_add" == "TRUE" ]]; then
# exit 1
# fi
#
# - name: Check for the exist of Dockerfile in all yamls.
# if: always()
# run: |
# shopt -s globstar
# no_exist="FALSE"
# cd ${{github.workspace}}
# yamls=$(find .github/workflows/docker/compose/ -name '*.yaml')
# if [ -n "$yamls" ]; then
# for yaml in $yamls; do
# dockerfiles=$(grep 'dockerfile:' "$yaml"|sed 's/dockerfile: //')
# for dockerfile in $dockerfiles; do
# if [[ "$dockerfile" == *"comps/"* ]]; then
# if ! [ -e "$dockerfile" ]; then
# # cat "$yaml"
# echo "AR: The dockerfile path "$dockerfile" in "$yaml" does not exist, remove or update it."
# no_exist="TRUE"
# fi
# fi
# done
# done
# fi
#
# if [[ "$no_exist" == "TRUE" ]]; then
# exit 1
# fi

Dockerfile-path-change-detection-in-GenAIExamples:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 7aedd69

Please sign in to comment.