diff --git a/.github/workflows/_comps-workflow.yml b/.github/workflows/_comps-workflow.yml index 46e669aa30..3c226d7c31 100644 --- a/.github/workflows/_comps-workflow.yml +++ b/.github/workflows/_comps-workflow.yml @@ -24,7 +24,7 @@ on: type: boolean mode: default: "CD" - description: "Whether the test range is CI or CD" + description: "Whether the test range is CI, CD or CICD" required: false type: string @@ -49,24 +49,32 @@ jobs: run: | cd ${{ github.workspace }}/.github/workflows/docker/compose # service=$(echo ${{ inputs.service }} | cut -d'_' -f1) - if [[ "${{ inputs.mode }}" == "CD" ]]; then - docker_compose_yml=${{ github.workspace }}/.github/workflows/docker/compose/${{ inputs.service }}-compose-cd.yaml - else - docker_compose_yml=${{ github.workspace }}/.github/workflows/docker/compose/${{ inputs.service }}-compose.yaml - fi + docker_compose_yml=${{ github.workspace }}/.github/workflows/docker/compose/${{ inputs.service }}-compose.yaml echo "docker_compose_path=${docker_compose_yml}" >> $GITHUB_OUTPUT if [ -f "$docker_compose_yml" ]; then echo "file_exists=true" >> $GITHUB_OUTPUT else - echo "There is no ${{ inputs.mode }} part of ${{ inputs.service }} that needs to be executed." + echo "The $docker_compose_yml does not exist!" echo "file_exists=false" >> $GITHUB_OUTPUT fi cd ${{ github.workspace }} if [[ $(grep -c "vllm-openvino:" ${docker_compose_yml}) != 0 ]]; then git clone https://github.com/vllm-project/vllm.git vllm-openvino - cd ./vllm-openvino && git checkout v0.6.1 && cd ../ + cd ./vllm-openvino && git checkout v0.6.1 && git rev-parse HEAD && cd ../ + fi + if [[ $(grep -c "vllm-hpu:" ${docker_compose_yml}) != 0 ]]; then + git clone https://github.com/HabanaAI/vllm-fork.git vllm-fork + cd vllm-fork && git rev-parse HEAD && cd ../ fi + - name: Get build list + id: get-build-list + env: + docker_compose_path: ${{ steps.get-yaml-path.outputs.docker_compose_path }} + mode: ${{ inputs.mode }} + run: | + build_list=$(bash ${{ github.workspace }}/.github/workflows/scripts/get_cicd_list.sh "${mode}" ${docker_compose_path}) + echo "build_list=${build_list}" >> $GITHUB_OUTPUT - name: Build Image if: ${{ fromJSON(inputs.build) && steps.get-yaml-path.outputs.file_exists == 'true' }} @@ -75,6 +83,7 @@ jobs: work_dir: ${{ github.workspace }} docker_compose_path: ${{ steps.get-yaml-path.outputs.docker_compose_path }} registry: ${OPEA_IMAGE_REPO}opea + service_list: ${{ steps.get-build-list.outputs.build_list }} tag: ${{ inputs.tag }} #################################################################################################### diff --git a/.github/workflows/_get-image-list.yml b/.github/workflows/_get-image-list.yml index aa6192df05..520ec832fb 100644 --- a/.github/workflows/_get-image-list.yml +++ b/.github/workflows/_get-image-list.yml @@ -41,14 +41,10 @@ jobs: services=($(echo ${{ inputs.services }} | tr ',' ' ')) for service in ${services[@]} do - if [[ "${{ inputs.mode }}" == "CD" ]]; then - docker_compose_yml=${{ github.workspace }}/.github/workflows/docker/compose/${service}-compose-cd.yaml - else - docker_compose_yml=${{ github.workspace }}/.github/workflows/docker/compose/${service}-compose.yaml - fi + docker_compose_yml=${{ github.workspace }}/.github/workflows/docker/compose/${service}-compose.yaml if [ -f "$docker_compose_yml" ]; then - images=$(cat $docker_compose_yml | yq -r '.[]' | jq 'keys' | jq -c '.') - image_list=$(echo ${image_list} | jq -s '.[0] + .[1] | unique' - <(echo ${images})) + build_list=$(bash ${{ github.workspace }}/.github/workflows/scripts/get_cicd_list.sh "${{ inputs.mode }}" $docker_compose_yml) + image_list=$(echo $build_list| jq -R 'split(",")' | jq -s 'add') fi done fi diff --git a/.github/workflows/docker/compose/agent-compose-cd.yaml b/.github/workflows/docker/compose/agent-compose.yaml similarity index 100% rename from .github/workflows/docker/compose/agent-compose-cd.yaml rename to .github/workflows/docker/compose/agent-compose.yaml diff --git a/.github/workflows/docker/compose/animation-compose-cd.yaml b/.github/workflows/docker/compose/animation-compose.yaml similarity index 89% rename from .github/workflows/docker/compose/animation-compose-cd.yaml rename to .github/workflows/docker/compose/animation-compose.yaml index 98b85cacf0..957e4273cc 100644 --- a/.github/workflows/docker/compose/animation-compose-cd.yaml +++ b/.github/workflows/docker/compose/animation-compose.yaml @@ -2,7 +2,6 @@ # SPDX-License-Identifier: Apache-2.0 # this file should be run in the root of the repo -# images used by GenAIExamples: animation, wav2lip, wav2lip-gaudi services: animation: build: diff --git a/.github/workflows/docker/compose/asr-compose.yaml b/.github/workflows/docker/compose/asr-compose.yaml index 5c8baf5683..bf50634f81 100644 --- a/.github/workflows/docker/compose/asr-compose.yaml +++ b/.github/workflows/docker/compose/asr-compose.yaml @@ -2,7 +2,6 @@ # SPDX-License-Identifier: Apache-2.0 # this file should be run in the root of the repo -# images used by GenAIExamples: asr,whisper,whisper-gaudi services: asr: build: diff --git a/.github/workflows/docker/compose/dataprep-compose-cd.yaml b/.github/workflows/docker/compose/dataprep-compose-cd.yaml deleted file mode 100644 index 61f9a92da1..0000000000 --- a/.github/workflows/docker/compose/dataprep-compose-cd.yaml +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (C) 2024 Intel Corporation -# SPDX-License-Identifier: Apache-2.0 - -# others: dataprep-redis-llama-index,dataprep-on-ray-redis -services: - dataprep-redis-llama-index: - build: - dockerfile: comps/dataprep/redis/llama_index/Dockerfile - image: ${REGISTRY:-opea}/dataprep-redis-llama-index:${TAG:-latest} - dataprep-milvus: - build: - dockerfile: comps/dataprep/milvus/langchain/Dockerfile - image: ${REGISTRY:-opea}/dataprep-milvus:${TAG:-latest} - dataprep-pgvector: - build: - dockerfile: comps/dataprep/pgvector/langchain/Dockerfile - image: ${REGISTRY:-opea}/dataprep-pgvector:${TAG:-latest} - dataprep-pinecone: - build: - dockerfile: comps/dataprep/pinecone/langchain/Dockerfile - image: ${REGISTRY:-opea}/dataprep-pinecone:${TAG:-latest} - dataprep-vdms: - build: - dockerfile: comps/dataprep/vdms/langchain/Dockerfile - image: ${REGISTRY:-opea}/dataprep-vdms:${TAG:-latest} - dataprep-neo4j: - build: - dockerfile: comps/dataprep/neo4j/langchain/Dockerfile - image: ${REGISTRY:-opea}/dataprep-neo4j:${TAG:-latest} - dataprep-neo4j-llamaindex: - build: - dockerfile: comps/dataprep/neo4j/llama_index/Dockerfile - image: ${REGISTRY:-opea}/dataprep-neo4j-llamaindex:${TAG:-latest} diff --git a/.github/workflows/docker/compose/dataprep-compose.yaml b/.github/workflows/docker/compose/dataprep-compose.yaml index 078fdb9987..2e5d6f9cde 100644 --- a/.github/workflows/docker/compose/dataprep-compose.yaml +++ b/.github/workflows/docker/compose/dataprep-compose.yaml @@ -2,8 +2,6 @@ # SPDX-License-Identifier: Apache-2.0 # this file should be run in the root of the repo -# images used by GenAIExamples: dataprep,dataprep-qdrant -# others: dataprep-redis-llama-index,dataprep-on-ray-redis services: dataprep-redis: build: @@ -25,3 +23,31 @@ services: build: dockerfile: comps/dataprep/multimodal/redis/langchain/Dockerfile image: ${REGISTRY:-opea}/dataprep-multimodal-redis:${TAG:-latest} + dataprep-redis-llama-index: + build: + dockerfile: comps/dataprep/redis/llama_index/Dockerfile + image: ${REGISTRY:-opea}/dataprep-redis-llama-index:${TAG:-latest} + dataprep-milvus: + build: + dockerfile: comps/dataprep/milvus/langchain/Dockerfile + image: ${REGISTRY:-opea}/dataprep-milvus:${TAG:-latest} + dataprep-pgvector: + build: + dockerfile: comps/dataprep/pgvector/langchain/Dockerfile + image: ${REGISTRY:-opea}/dataprep-pgvector:${TAG:-latest} + dataprep-pinecone: + build: + dockerfile: comps/dataprep/pinecone/langchain/Dockerfile + image: ${REGISTRY:-opea}/dataprep-pinecone:${TAG:-latest} + dataprep-vdms: + build: + dockerfile: comps/dataprep/vdms/langchain/Dockerfile + image: ${REGISTRY:-opea}/dataprep-vdms:${TAG:-latest} + dataprep-neo4j: + build: + dockerfile: comps/dataprep/neo4j/langchain/Dockerfile + image: ${REGISTRY:-opea}/dataprep-neo4j:${TAG:-latest} + dataprep-neo4j-llamaindex: + build: + dockerfile: comps/dataprep/neo4j/llama_index/Dockerfile + image: ${REGISTRY:-opea}/dataprep-neo4j-llamaindex:${TAG:-latest} diff --git a/.github/workflows/docker/compose/embeddings-compose-cd.yaml b/.github/workflows/docker/compose/embeddings-compose-cd.yaml deleted file mode 100644 index a9d76fa0eb..0000000000 --- a/.github/workflows/docker/compose/embeddings-compose-cd.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (C) 2024 Intel Corporation -# SPDX-License-Identifier: Apache-2.0 - -services: - embedding-langchain-mosec-endpoint: - build: - dockerfile: comps/embeddings/mosec/langchain/dependency/Dockerfile - image: ${REGISTRY:-opea}/embedding-langchain-mosec-endpoint:${TAG:-latest} - embedding-langchain-mosec: - build: - dockerfile: comps/embeddings/mosec/langchain/Dockerfile - image: ${REGISTRY:-opea}/embedding-langchain-mosec:${TAG:-latest} - embedding-tei-llama-index: - build: - dockerfile: comps/embeddings/tei/llama_index/Dockerfile - image: ${REGISTRY:-opea}/embedding-tei-llama-index:${TAG:-latest} - embedding-multimodal-bridgetower-gaudi: - build: - dockerfile: comps/embeddings/multimodal/bridgetower/Dockerfile.intel_hpu - image: ${REGISTRY:-opea}/embedding-multimodal-bridgetower-gaudi:${TAG:-latest} - embedding-predictionguard: - build: - dockerfile: comps/embeddings/predictionguard/Dockerfile - image: ${REGISTRY:-opea}/embedding-predictionguard:${TAG:-latest} - embedding-reranking-local: - build: - dockerfile: comps/embeddings/tei/langchain/Dockerfile.dynamic_batching - image: ${REGISTRY:-opea}/embedding-reranking-local:${TAG:-latest} diff --git a/.github/workflows/docker/compose/embeddings-compose.yaml b/.github/workflows/docker/compose/embeddings-compose.yaml index 5f486cfca4..417a005c6d 100644 --- a/.github/workflows/docker/compose/embeddings-compose.yaml +++ b/.github/workflows/docker/compose/embeddings-compose.yaml @@ -2,7 +2,6 @@ # SPDX-License-Identifier: Apache-2.0 # this file should be run in the root of the repo -# images used by GenAIExamples: embedding-tei services: embedding-tei: build: @@ -20,3 +19,27 @@ services: build: dockerfile: comps/embeddings/multimodal/multimodal_langchain/Dockerfile image: ${REGISTRY:-opea}/embedding-multimodal:${TAG:-latest} + embedding-langchain-mosec-endpoint: + build: + dockerfile: comps/embeddings/mosec/langchain/dependency/Dockerfile + image: ${REGISTRY:-opea}/embedding-langchain-mosec-endpoint:${TAG:-latest} + embedding-langchain-mosec: + build: + dockerfile: comps/embeddings/mosec/langchain/Dockerfile + image: ${REGISTRY:-opea}/embedding-langchain-mosec:${TAG:-latest} + embedding-tei-llama-index: + build: + dockerfile: comps/embeddings/tei/llama_index/Dockerfile + image: ${REGISTRY:-opea}/embedding-tei-llama-index:${TAG:-latest} + embedding-multimodal-bridgetower-gaudi: + build: + dockerfile: comps/embeddings/multimodal/bridgetower/Dockerfile.intel_hpu + image: ${REGISTRY:-opea}/embedding-multimodal-bridgetower-gaudi:${TAG:-latest} + embedding-predictionguard: + build: + dockerfile: comps/embeddings/predictionguard/Dockerfile + image: ${REGISTRY:-opea}/embedding-predictionguard:${TAG:-latest} + embedding-reranking-local: + build: + dockerfile: comps/embeddings/tei/langchain/Dockerfile.dynamic_batching + image: ${REGISTRY:-opea}/embedding-reranking-local:${TAG:-latest} diff --git a/.github/workflows/docker/compose/feedback_management-compose-cd.yaml b/.github/workflows/docker/compose/feedback_management-compose.yaml similarity index 100% rename from .github/workflows/docker/compose/feedback_management-compose-cd.yaml rename to .github/workflows/docker/compose/feedback_management-compose.yaml diff --git a/.github/workflows/docker/compose/finetuning-compose-cd.yaml b/.github/workflows/docker/compose/finetuning-compose-cd.yaml deleted file mode 100644 index ece822a44e..0000000000 --- a/.github/workflows/docker/compose/finetuning-compose-cd.yaml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (C) 2024 Intel Corporation -# SPDX-License-Identifier: Apache-2.0 - -# this file should be run in the root of the repo -services: - finetuning-gaudi: - build: - dockerfile: comps/finetuning/Dockerfile.intel_hpu - image: ${REGISTRY:-opea}/finetuning-gaudi:${TAG:-latest} diff --git a/.github/workflows/docker/compose/finetuning-compose.yaml b/.github/workflows/docker/compose/finetuning-compose.yaml index 5a48dc9059..94e20941c0 100644 --- a/.github/workflows/docker/compose/finetuning-compose.yaml +++ b/.github/workflows/docker/compose/finetuning-compose.yaml @@ -7,3 +7,7 @@ services: build: dockerfile: comps/finetuning/Dockerfile image: ${REGISTRY:-opea}/finetuning:${TAG:-latest} + finetuning-gaudi: + build: + dockerfile: comps/finetuning/Dockerfile.intel_hpu + image: ${REGISTRY:-opea}/finetuning-gaudi:${TAG:-latest} diff --git a/.github/workflows/docker/compose/guardrails-compose-cd.yaml b/.github/workflows/docker/compose/guardrails-compose-cd.yaml deleted file mode 100644 index 3954f0a8ad..0000000000 --- a/.github/workflows/docker/compose/guardrails-compose-cd.yaml +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright (C) 2024 Intel Corporation -# SPDX-License-Identifier: Apache-2.0 - -services: - guardrails-pii-detection: - build: - dockerfile: comps/guardrails/pii_detection/Dockerfile - image: ${REGISTRY:-opea}/guardrails-pii-detection:${TAG:-latest} - guardrails-bias-detection: - build: - dockerfile: comps/guardrails/bias_detection/Dockerfile - image: ${REGISTRY:-opea}/guardrails-bias-detection:${TAG:-latest} - guardrails-toxicity-detection: - build: - dockerfile: comps/guardrails/toxicity_detection/Dockerfile - image: ${REGISTRY:-opea}/guardrails-toxicity-detection:${TAG:-latest} - guardrails-wildguard: - build: - dockerfile: comps/guardrails/wildguard/langchain/Dockerfile - image: ${REGISTRY:-opea}/guardrails-wildguard:${TAG:-latest} - guardrails-pii-detection-predictionguard: - build: - dockerfile: comps/guardrails/pii_detection/predictionguard/Dockerfile - image: ${REGISTRY:-opea}/guardrails-pii-predictionguard:${TAG:-latest} - guardrails-toxicity-detection-predictionguard: - build: - dockerfile: comps/guardrails/toxicity_detection/predictionguard/Dockerfile - image: ${REGISTRY:-opea}/guardrails-toxicity-predictionguard:${TAG:-latest} - guardrails-factuality-predictionguard: - build: - dockerfile: comps/guardrails/factuality/predictionguard/Dockerfile - image: ${REGISTRY:-opea}/guardrails-factuality-predictionguard:${TAG:-latest} - guardrails-injection-predictionguard: - build: - dockerfile: comps/guardrails/prompt_injection/predictionguard/Dockerfile - image: ${REGISTRY:-opea}/guardrails-injection-predictionguard:${TAG:-latest} diff --git a/.github/workflows/docker/compose/guardrails-compose.yaml b/.github/workflows/docker/compose/guardrails-compose.yaml index 97b950dc81..2cd646bd82 100644 --- a/.github/workflows/docker/compose/guardrails-compose.yaml +++ b/.github/workflows/docker/compose/guardrails-compose.yaml @@ -2,15 +2,40 @@ # SPDX-License-Identifier: Apache-2.0 # this file should be run in the root of the repo -# images used by GenAIExamples: guardrails-tgi -# others: guardrails-pii-detection services: guardrails-tgi: build: dockerfile: comps/guardrails/llama_guard/langchain/Dockerfile image: ${REGISTRY:-opea}/guardrails-tgi:${TAG:-latest} - + guardrails-pii-detection: + build: + dockerfile: comps/guardrails/pii_detection/Dockerfile + image: ${REGISTRY:-opea}/guardrails-pii-detection:${TAG:-latest} guardrails-bias-detection: build: - dockerfile: comps/guardrails/llama_guard/langchain/Dockerfile + dockerfile: comps/guardrails/bias_detection/Dockerfile image: ${REGISTRY:-opea}/guardrails-bias-detection:${TAG:-latest} + guardrails-toxicity-detection: + build: + dockerfile: comps/guardrails/toxicity_detection/Dockerfile + image: ${REGISTRY:-opea}/guardrails-toxicity-detection:${TAG:-latest} + guardrails-wildguard: + build: + dockerfile: comps/guardrails/wildguard/langchain/Dockerfile + image: ${REGISTRY:-opea}/guardrails-wildguard:${TAG:-latest} + guardrails-pii-detection-predictionguard: + build: + dockerfile: comps/guardrails/pii_detection/predictionguard/Dockerfile + image: ${REGISTRY:-opea}/guardrails-pii-predictionguard:${TAG:-latest} + guardrails-toxicity-detection-predictionguard: + build: + dockerfile: comps/guardrails/toxicity_detection/predictionguard/Dockerfile + image: ${REGISTRY:-opea}/guardrails-toxicity-predictionguard:${TAG:-latest} + guardrails-factuality-predictionguard: + build: + dockerfile: comps/guardrails/factuality/predictionguard/Dockerfile + image: ${REGISTRY:-opea}/guardrails-factuality-predictionguard:${TAG:-latest} + guardrails-injection-predictionguard: + build: + dockerfile: comps/guardrails/prompt_injection/predictionguard/Dockerfile + image: ${REGISTRY:-opea}/guardrails-injection-predictionguard:${TAG:-latest} diff --git a/.github/workflows/docker/compose/image2image-compose-cd.yaml b/.github/workflows/docker/compose/image2image-compose.yaml similarity index 87% rename from .github/workflows/docker/compose/image2image-compose-cd.yaml rename to .github/workflows/docker/compose/image2image-compose.yaml index c2db4d40aa..7d3b451498 100644 --- a/.github/workflows/docker/compose/image2image-compose-cd.yaml +++ b/.github/workflows/docker/compose/image2image-compose.yaml @@ -2,7 +2,6 @@ # SPDX-License-Identifier: Apache-2.0 # this file should be run in the root of the repo -# images used by GenAIExamples: image2image,image2image-gaudi services: image2image: build: diff --git a/.github/workflows/docker/compose/image2video-compose-cd.yaml b/.github/workflows/docker/compose/image2video-compose.yaml similarity index 90% rename from .github/workflows/docker/compose/image2video-compose-cd.yaml rename to .github/workflows/docker/compose/image2video-compose.yaml index a28c45d219..b74bea49fb 100644 --- a/.github/workflows/docker/compose/image2video-compose-cd.yaml +++ b/.github/workflows/docker/compose/image2video-compose.yaml @@ -2,7 +2,6 @@ # SPDX-License-Identifier: Apache-2.0 # this file should be run in the root of the repo -# images used by GenAIExamples: image2video,svd,svd-gaudi services: image2video: build: diff --git a/.github/workflows/docker/compose/intent_detection-compose-cd.yaml b/.github/workflows/docker/compose/intent_detection-compose.yaml similarity index 100% rename from .github/workflows/docker/compose/intent_detection-compose-cd.yaml rename to .github/workflows/docker/compose/intent_detection-compose.yaml diff --git a/.github/workflows/docker/compose/llms-compose-cd.yaml b/.github/workflows/docker/compose/llms-compose-cd.yaml deleted file mode 100644 index 2e8138f0ef..0000000000 --- a/.github/workflows/docker/compose/llms-compose-cd.yaml +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (C) 2024 Intel Corporation -# SPDX-License-Identifier: Apache-2.0 - -services: - llm-native: - build: - dockerfile: comps/llms/text-generation/native/langchain/Dockerfile - image: ${REGISTRY:-opea}/llm-native:${TAG:-latest} - llm-native-llamaindex: - build: - dockerfile: comps/llms/text-generation/native/llama_index/Dockerfile - image: ${REGISTRY:-opea}/llm-native-llamaindex:${TAG:-latest} - vllm-openvino: - build: - context: vllm-openvino - dockerfile: Dockerfile.openvino - image: ${REGISTRY:-opea}/vllm-openvino:${TAG:-latest} - vllm-arc: - build: - dockerfile: comps/llms/text-generation/vllm/langchain/dependency/Dockerfile.intel_gpu - image: ${REGISTRY:-opea}/vllm-arc:${TAG:-latest} - llm-eval: - build: - dockerfile: comps/llms/utils/lm-eval/Dockerfile - image: ${REGISTRY:-opea}/llm-eval:${TAG:-latest} - llm-vllm-llamaindex: - build: - dockerfile: comps/llms/text-generation/vllm/llama_index/Dockerfile - image: ${REGISTRY:-opea}/llm-vllm-llamaindex:${TAG:-latest} - llm-predictionguard: - build: - dockerfile: comps/llms/text-generation/predictionguard/Dockerfile - image: ${REGISTRY:-opea}/llm-textgen-predictionguard:${TAG:-latest} diff --git a/.github/workflows/docker/compose/llms-compose.yaml b/.github/workflows/docker/compose/llms-compose.yaml index f60aa425e9..723b856e46 100644 --- a/.github/workflows/docker/compose/llms-compose.yaml +++ b/.github/workflows/docker/compose/llms-compose.yaml @@ -2,7 +2,6 @@ # SPDX-License-Identifier: Apache-2.0 # this file should be run in the root of the repo -# images used by GenAIExamples: llm-tgi,llm-ollama,llm-docsum-tgi,llm-faqgen-tgi,llm-vllm,llm-vllm-hpu,llm-vllm-ray,llm-vllm-ray-hpu services: llm-tgi: build: @@ -24,3 +23,38 @@ services: build: dockerfile: comps/llms/text-generation/vllm/langchain/Dockerfile image: ${REGISTRY:-opea}/llm-vllm:${TAG:-latest} + llm-native: + build: + dockerfile: comps/llms/text-generation/native/langchain/Dockerfile + image: ${REGISTRY:-opea}/llm-native:${TAG:-latest} + llm-native-llamaindex: + build: + dockerfile: comps/llms/text-generation/native/llama_index/Dockerfile + image: ${REGISTRY:-opea}/llm-native-llamaindex:${TAG:-latest} + vllm-openvino: + build: + context: vllm-openvino + dockerfile: Dockerfile.openvino + image: ${REGISTRY:-opea}/vllm-openvino:${TAG:-latest} + vllm-hpu: + build: + context: vllm-fork + dockerfile: Dockerfile.hpu + shm_size: '128g' + image: ${REGISTRY:-opea}/vllm-hpu:${TAG:-latest} + vllm-arc: + build: + dockerfile: comps/llms/text-generation/vllm/langchain/dependency/Dockerfile.intel_gpu + image: ${REGISTRY:-opea}/vllm-arc:${TAG:-latest} + llm-eval: + build: + dockerfile: comps/llms/utils/lm-eval/Dockerfile + image: ${REGISTRY:-opea}/llm-eval:${TAG:-latest} + llm-vllm-llamaindex: + build: + dockerfile: comps/llms/text-generation/vllm/llama_index/Dockerfile + image: ${REGISTRY:-opea}/llm-vllm-llamaindex:${TAG:-latest} + llm-predictionguard: + build: + dockerfile: comps/llms/text-generation/predictionguard/Dockerfile + image: ${REGISTRY:-opea}/llm-textgen-predictionguard:${TAG:-latest} diff --git a/.github/workflows/docker/compose/lvms-compose-cd.yaml b/.github/workflows/docker/compose/lvms-compose-cd.yaml deleted file mode 100644 index fffd5da598..0000000000 --- a/.github/workflows/docker/compose/lvms-compose-cd.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright (C) 2024 Intel Corporation -# SPDX-License-Identifier: Apache-2.0 - -# this file should be run in the root of the repo -services: - llava-hpu: - build: - dockerfile: comps/lvms/llava/dependency/Dockerfile.intel_hpu - image: ${REGISTRY:-opea}/llava-hpu:${TAG:-latest} - lvm-predictionguard: - build: - dockerfile: comps/lvms/predictionguard/Dockerfile - image: ${REGISTRY:-opea}/lvm-predictionguard:${TAG:-latest} - lvm-llama-vision: - build: - dockerfile: comps/lvms/llama-vision/Dockerfile - image: ${REGISTRY:-opea}/lvm-llama-vision:${TAG:-latest} - lvm-llama-vision-tp: - build: - dockerfile: comps/lvms/llama-vision/Dockerfile_tp - image: ${REGISTRY:-opea}/lvm-llama-vision-tp:${TAG:-latest} - lvm-llama-vision-guard: - build: - dockerfile: comps/lvms/llama-vision/Dockerfile_guard - image: ${REGISTRY:-opea}/lvm-llama-vision-guard:${TAG:-latest} diff --git a/.github/workflows/docker/compose/lvms-compose.yaml b/.github/workflows/docker/compose/lvms-compose.yaml index f602a6155f..e8ed56a2c3 100644 --- a/.github/workflows/docker/compose/lvms-compose.yaml +++ b/.github/workflows/docker/compose/lvms-compose.yaml @@ -23,3 +23,23 @@ services: build: dockerfile: comps/lvms/llava/Dockerfile image: ${REGISTRY:-opea}/lvm-llava-svc:${TAG:-latest} + llava-hpu: + build: + dockerfile: comps/lvms/llava/dependency/Dockerfile.intel_hpu + image: ${REGISTRY:-opea}/llava-hpu:${TAG:-latest} + lvm-predictionguard: + build: + dockerfile: comps/lvms/predictionguard/Dockerfile + image: ${REGISTRY:-opea}/lvm-predictionguard:${TAG:-latest} + lvm-llama-vision: + build: + dockerfile: comps/lvms/llama-vision/Dockerfile + image: ${REGISTRY:-opea}/lvm-llama-vision:${TAG:-latest} + lvm-llama-vision-tp: + build: + dockerfile: comps/lvms/llama-vision/Dockerfile_tp + image: ${REGISTRY:-opea}/lvm-llama-vision-tp:${TAG:-latest} + lvm-llama-vision-guard: + build: + dockerfile: comps/lvms/llama-vision/Dockerfile_guard + image: ${REGISTRY:-opea}/lvm-llama-vision-guard:${TAG:-latest} diff --git a/.github/workflows/docker/compose/ragas-compose-cd.yaml b/.github/workflows/docker/compose/ragas-compose.yaml similarity index 100% rename from .github/workflows/docker/compose/ragas-compose-cd.yaml rename to .github/workflows/docker/compose/ragas-compose.yaml diff --git a/.github/workflows/docker/compose/reranks-compose-cd.yaml b/.github/workflows/docker/compose/reranks-compose-cd.yaml deleted file mode 100644 index 3e5e7caabf..0000000000 --- a/.github/workflows/docker/compose/reranks-compose-cd.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (C) 2024 Intel Corporation -# SPDX-License-Identifier: Apache-2.0 - -services: - reranking-fastrag: - build: - dockerfile: comps/reranks/fastrag/Dockerfile - image: ${REGISTRY:-opea}/reranking-fastrag:${TAG:-latest} - reranking-langchain-mosec-endpoint: - build: - dockerfile: comps/reranks/mosec/langchain/dependency/Dockerfile - image: ${REGISTRY:-opea}/reranking-langchain-mosec-endpoint:${TAG:-latest} - reranking-langchain-mosec: - build: - dockerfile: comps/reranks/mosec/langchain/Dockerfile - image: ${REGISTRY:-opea}/reranking-langchain-mosec:${TAG:-latest} diff --git a/.github/workflows/docker/compose/reranks-compose.yaml b/.github/workflows/docker/compose/reranks-compose.yaml index 1a160d3b63..2d3526c1cc 100644 --- a/.github/workflows/docker/compose/reranks-compose.yaml +++ b/.github/workflows/docker/compose/reranks-compose.yaml @@ -2,7 +2,6 @@ # SPDX-License-Identifier: Apache-2.0 # this file should be run in the root of the repo -# images used by GenAIExamples: reranking-tei services: reranking-tei: build: @@ -12,3 +11,15 @@ services: build: dockerfile: comps/reranks/videoqna/Dockerfile image: ${REGISTRY:-opea}/reranking-videoqna:${TAG:-latest} + reranking-fastrag: + build: + dockerfile: comps/reranks/fastrag/Dockerfile + image: ${REGISTRY:-opea}/reranking-fastrag:${TAG:-latest} + reranking-langchain-mosec-endpoint: + build: + dockerfile: comps/reranks/mosec/langchain/dependency/Dockerfile + image: ${REGISTRY:-opea}/reranking-langchain-mosec-endpoint:${TAG:-latest} + reranking-langchain-mosec: + build: + dockerfile: comps/reranks/mosec/langchain/Dockerfile + image: ${REGISTRY:-opea}/reranking-langchain-mosec:${TAG:-latest} diff --git a/.github/workflows/docker/compose/retrievers-compose-cd.yaml b/.github/workflows/docker/compose/retrievers-compose-cd.yaml deleted file mode 100644 index 5b1718cf66..0000000000 --- a/.github/workflows/docker/compose/retrievers-compose-cd.yaml +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (C) 2024 Intel Corporation -# SPDX-License-Identifier: Apache-2.0 - -# this file should be run in the root of the repo -services: - retriever-pgvector: - build: - dockerfile: comps/retrievers/pgvector/langchain/Dockerfile - image: ${REGISTRY:-opea}/retriever-pgvector:${TAG:-latest} - retriever-pinecone: - build: - dockerfile: comps/retrievers/pinecone/langchain/Dockerfile - image: ${REGISTRY:-opea}/retriever-pinecone:${TAG:-latest} - retriever-milvus: - build: - dockerfile: comps/retrievers/milvus/langchain/Dockerfile - image: ${REGISTRY:-opea}/retriever-milvus:${TAG:-latest} - retriever-redis-llamaindex: - build: - dockerfile: comps/retrievers/redis/llama_index/Dockerfile - image: ${REGISTRY:-opea}/retriever-redis-llamaindex:${TAG:-latest} - retriever-pathway: - build: - dockerfile: comps/retrievers/pathway/langchain/Dockerfile - image: ${REGISTRY:-opea}/retriever-pathway:${TAG:-latest} - retriever-neo4j: - build: - dockerfile: comps/retrievers/neo4j/langchain/Dockerfile - image: ${REGISTRY:-opea}/retriever-neo4j:${TAG:-latest} - retriever-neo4j-llamaindex: - build: - dockerfile: comps/retrievers/neo4j/llama_index/Dockerfile - image: ${REGISTRY:-opea}/retriever-neo4j-llamaindex:${TAG:-latest} diff --git a/.github/workflows/docker/compose/retrievers-compose.yaml b/.github/workflows/docker/compose/retrievers-compose.yaml index 4e72d955ff..7b89ce9bfe 100644 --- a/.github/workflows/docker/compose/retrievers-compose.yaml +++ b/.github/workflows/docker/compose/retrievers-compose.yaml @@ -19,3 +19,31 @@ services: build: dockerfile: comps/retrievers/multimodal/redis/langchain/Dockerfile image: ${REGISTRY:-opea}/retriever-multimodal-redis:${TAG:-latest} + retriever-pgvector: + build: + dockerfile: comps/retrievers/pgvector/langchain/Dockerfile + image: ${REGISTRY:-opea}/retriever-pgvector:${TAG:-latest} + retriever-pinecone: + build: + dockerfile: comps/retrievers/pinecone/langchain/Dockerfile + image: ${REGISTRY:-opea}/retriever-pinecone:${TAG:-latest} + retriever-milvus: + build: + dockerfile: comps/retrievers/milvus/langchain/Dockerfile + image: ${REGISTRY:-opea}/retriever-milvus:${TAG:-latest} + retriever-redis-llamaindex: + build: + dockerfile: comps/retrievers/redis/llama_index/Dockerfile + image: ${REGISTRY:-opea}/retriever-redis-llamaindex:${TAG:-latest} + retriever-pathway: + build: + dockerfile: comps/retrievers/pathway/langchain/Dockerfile + image: ${REGISTRY:-opea}/retriever-pathway:${TAG:-latest} + retriever-neo4j: + build: + dockerfile: comps/retrievers/neo4j/langchain/Dockerfile + image: ${REGISTRY:-opea}/retriever-neo4j:${TAG:-latest} + retriever-neo4j-llamaindex: + build: + dockerfile: comps/retrievers/neo4j/llama_index/Dockerfile + image: ${REGISTRY:-opea}/retriever-neo4j-llamaindex:${TAG:-latest} diff --git a/.github/workflows/docker/compose/text2image-compose-cd.yaml b/.github/workflows/docker/compose/text2image-compose.yaml similarity index 87% rename from .github/workflows/docker/compose/text2image-compose-cd.yaml rename to .github/workflows/docker/compose/text2image-compose.yaml index d2737922f4..1cd448e6a9 100644 --- a/.github/workflows/docker/compose/text2image-compose-cd.yaml +++ b/.github/workflows/docker/compose/text2image-compose.yaml @@ -2,7 +2,6 @@ # SPDX-License-Identifier: Apache-2.0 # this file should be run in the root of the repo -# images used by GenAIExamples: text2image,text2image-gaudi services: text2image: build: diff --git a/.github/workflows/docker/compose/texttosql-compose-cd.yaml b/.github/workflows/docker/compose/texttosql-compose.yaml similarity index 100% rename from .github/workflows/docker/compose/texttosql-compose-cd.yaml rename to .github/workflows/docker/compose/texttosql-compose.yaml diff --git a/.github/workflows/docker/compose/tts-compose.yaml b/.github/workflows/docker/compose/tts-compose.yaml index d43fcbd790..da0ca7c886 100644 --- a/.github/workflows/docker/compose/tts-compose.yaml +++ b/.github/workflows/docker/compose/tts-compose.yaml @@ -2,7 +2,6 @@ # 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: build: diff --git a/.github/workflows/docker/compose/vectorstores-compose-cd.yaml b/.github/workflows/docker/compose/vectorstores-compose.yaml similarity index 100% rename from .github/workflows/docker/compose/vectorstores-compose-cd.yaml rename to .github/workflows/docker/compose/vectorstores-compose.yaml diff --git a/.github/workflows/docker/compose/web_retrievers-compose.yaml b/.github/workflows/docker/compose/web_retrievers-compose.yaml index 7fd080ee2c..94f4fa8d25 100644 --- a/.github/workflows/docker/compose/web_retrievers-compose.yaml +++ b/.github/workflows/docker/compose/web_retrievers-compose.yaml @@ -2,7 +2,6 @@ # SPDX-License-Identifier: Apache-2.0 # this file should be run in the root of the repo -# images used by GenAIExamples: web-retriever-chroma services: web-retriever-chroma: build: diff --git a/.github/workflows/manual-comps-test.yml b/.github/workflows/manual-comps-test.yml index bc2ed86a8b..5f2a3d6b7d 100644 --- a/.github/workflows/manual-comps-test.yml +++ b/.github/workflows/manual-comps-test.yml @@ -27,7 +27,7 @@ on: type: string mode: default: "CD" - description: "Whether the test range is CI or CD" + description: "Whether the test range is CI, CD or CICD" required: false type: string diff --git a/.github/workflows/manual-docker-publish.yml b/.github/workflows/manual-docker-publish.yml index b3c3fc3143..10c5e78b3a 100644 --- a/.github/workflows/manual-docker-publish.yml +++ b/.github/workflows/manual-docker-publish.yml @@ -27,7 +27,7 @@ on: type: string mode: default: "CD" - description: "Whether the test range is CI or CD" + description: "Whether the test range is CI, CD or CICD" required: false type: string diff --git a/.github/workflows/manual-docker-scan.yml b/.github/workflows/manual-docker-scan.yml index 9a9f4ce9dc..f1111b938e 100644 --- a/.github/workflows/manual-docker-scan.yml +++ b/.github/workflows/manual-docker-scan.yml @@ -32,7 +32,7 @@ on: type: boolean mode: default: "CD" - description: "Whether the test range is CI or CD" + description: "Whether the test range is CI, CD or CICD" required: false type: string diff --git a/.github/workflows/pr-dockerfile-path-scan.yaml b/.github/workflows/pr-dockerfile-path-scan.yaml index d6016d3967..bde58d66cc 100644 --- a/.github/workflows/pr-dockerfile-path-scan.yaml +++ b/.github/workflows/pr-dockerfile-path-scan.yaml @@ -75,7 +75,7 @@ jobs: 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. The yaml is used for release images build." + echo "AR: Update $Dockerfile to .github/workflows/docker/compose/"$service"-compose.yaml. The yaml is used for release images build." no_add="TRUE" fi done diff --git a/.github/workflows/push-image-build.yml b/.github/workflows/push-image-build.yml index ba532f4810..208e0eb995 100644 --- a/.github/workflows/push-image-build.yml +++ b/.github/workflows/push-image-build.yml @@ -65,6 +65,14 @@ jobs: echo "file_exists=false" >> $GITHUB_ENV echo "docker_compose_path=${docker_compose_path} for this service does not exist, so skipping image build for this service!!!" fi + - name: Get build list + id: get-build-list + env: + docker_compose_path: ${{ env.docker_compose_path }} + mode: CI + run: | + build_list=$(bash ${{ github.workspace }}/.github/workflows/scripts/get_cicd_list.sh "${mode}" ${docker_compose_path}) + echo "build_list=${build_list}" >> $GITHUB_OUTPUT - name: Build Image if: env.file_exists == 'true' @@ -73,3 +81,4 @@ jobs: work_dir: ${{ github.workspace }} docker_compose_path: ${{ env.docker_compose_path }} registry: ${OPEA_IMAGE_REPO}opea + service_list: ${{ steps.get-build-list.outputs.build_list }} diff --git a/.github/workflows/scripts/get_cicd_list.sh b/.github/workflows/scripts/get_cicd_list.sh new file mode 100644 index 0000000000..a7593d2eb5 --- /dev/null +++ b/.github/workflows/scripts/get_cicd_list.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + +WORKPATH=$PWD +# echo "mode is: "$1 "compose file is: "$2 +git clone https://github.com/opea-project/GenAIExamples.git +all_ci_yaml=$(find GenAIExamples -name "build.yaml") +all_ci_lists=$(grep '^[[:space:]]\{2\}[a-zA-Z0-9_-]\+:' $all_ci_yaml | awk -F: '{print$2}' | sed 's/^[[:space:]]\+//' | tr '\n' ',' | sed 's/,$//') + +all_lists=$(grep '^[[:space:]]\{2\}[a-zA-Z0-9_-]\+:' $2 | sed 's/^[[:space:]]\{2\}\([a-zA-Z0-9_-]\+\):.*/\1/' | tr '\n' ',' | sed 's/,$//') +cd_lists=$(echo "$all_lists" | tr ',' '\n' | grep -v -F -x -f <(echo "$all_ci_lists" | tr ',' '\n') | tr '\n' ',' | sed 's/,$//') +ci_lists=$(echo "$all_lists" | tr ',' '\n' | grep -F -x -f <(echo "$all_ci_lists" | tr ',' '\n') | tr '\n' ',' | sed 's/,$//') +if [[ "$1" == "CI" ]]; then + echo "$ci_lists" +elif [[ "$1" == "CD" ]]; then + echo "$cd_lists" +elif [[ "$1" == "CICD" ]]; then + echo "$all_lists" +fi diff --git a/comps/agent/langchain/README.md b/comps/agent/langchain/README.md index cc03aad170..2ff934f6c2 100644 --- a/comps/agent/langchain/README.md +++ b/comps/agent/langchain/README.md @@ -93,10 +93,10 @@ export vllm_volume=${YOUR_LOCAL_DIR_FOR_MODELS} # build vLLM image git clone https://github.com/HabanaAI/vllm-fork.git cd ./vllm-fork -docker build -f Dockerfile.hpu -t opea/vllm:hpu --shm-size=128g . --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy +docker build -f Dockerfile.hpu -t opea/vllm-hpu:latest --shm-size=128g . --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy # TGI serving -docker run -d --runtime=habana --rm --name "comps-vllm-gaudi-service" -p 8080:80 -v $vllm_volume:/data -e HF_TOKEN=$HF_TOKEN -e HF_HOME=/data -e OMPI_MCA_btl_vader_single_copy_mechanism=none -e PT_HPU_ENABLE_LAZY_COLLECTIVES=true -e http_proxy=$http_proxy -e https_proxy=$https_proxy -e VLLM_SKIP_WARMUP=true --cap-add=sys_nice --ipc=host opea/vllm:hpu --model ${model} --host 0.0.0.0 --port 80 --block-size 128 --max-num-seqs 4096 --max-seq_len-to-capture 8192 --enable-auto-tool-choice --tool-call-parser mistral +docker run -d --runtime=habana --rm --name "comps-vllm-gaudi-service" -p 8080:80 -v $vllm_volume:/data -e HF_TOKEN=$HF_TOKEN -e HF_HOME=/data -e OMPI_MCA_btl_vader_single_copy_mechanism=none -e PT_HPU_ENABLE_LAZY_COLLECTIVES=true -e http_proxy=$http_proxy -e https_proxy=$https_proxy -e VLLM_SKIP_WARMUP=true --cap-add=sys_nice --ipc=host opea/vllm-hpu:latest --model ${model} --host 0.0.0.0 --port 80 --block-size 128 --max-num-seqs 4096 --max-seq_len-to-capture 8192 --enable-auto-tool-choice --tool-call-parser mistral # check status docker logs comps-vllm-gaudi-service diff --git a/comps/llms/text-generation/README.md b/comps/llms/text-generation/README.md index 51e027d9fd..824d8a2277 100644 --- a/comps/llms/text-generation/README.md +++ b/comps/llms/text-generation/README.md @@ -101,7 +101,7 @@ export LLM_MODEL=${your_hf_llm_model} export DATA_DIR=$HOME/data # Location to download the model export HF_TOKEN=${your_hf_api_token} -# Build the image first as opea/vllm:cpu +# Build the image first as opea/vllm-cpu bash ${OPEA_GENAICOMPS_ROOT}/comps/llms/text-generation/vllm/langchain/dependency/build_docker_vllm.sh cpu # Initiate the backend @@ -111,7 +111,7 @@ docker run -d -it \ -e HF_TOKEN=${HF_TOKEN} \ -e VLLM_CPU_KVCACHE_SPACE=40 \ -v ${DATA_DIR}:/data \ - opea/vllm:cpu \ + opea/vllm-cpu:latest \ --model ${LLM_MODEL} \ --port 80 diff --git a/comps/llms/text-generation/vllm/langchain/README.md b/comps/llms/text-generation/vllm/langchain/README.md index 3294431a7f..d3f48e7687 100644 --- a/comps/llms/text-generation/vllm/langchain/README.md +++ b/comps/llms/text-generation/vllm/langchain/README.md @@ -113,7 +113,7 @@ To build the docker image for Intel CPU, run the command bash ./build_docker_vllm_openvino.sh ``` -Once it successfully builds, you will have the `vllm:openvino` image. It can be used to spawn a serving container with OpenAI API endpoint or you can work with it interactively via bash shell. +Once it successfully builds, you will have the `vllm-openvino` image. It can be used to spawn a serving container with OpenAI API endpoint or you can work with it interactively via bash shell. To build the docker image for Intel GPU, run the command diff --git a/comps/llms/text-generation/vllm/langchain/dependency/build_docker_vllm.sh b/comps/llms/text-generation/vllm/langchain/dependency/build_docker_vllm.sh index 4d42874bb6..2e8d4e89db 100644 --- a/comps/llms/text-generation/vllm/langchain/dependency/build_docker_vllm.sh +++ b/comps/llms/text-generation/vllm/langchain/dependency/build_docker_vllm.sh @@ -37,13 +37,13 @@ fi if [ "$hw_mode" = "hpu" ]; then git clone https://github.com/HabanaAI/vllm-fork.git cd ./vllm-fork/ - docker build -f Dockerfile.hpu -t opea/vllm:hpu --shm-size=128g . --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy + docker build -f Dockerfile.hpu -t opea/vllm-hpu:latest --shm-size=128g . --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy cd .. rm -rf vllm-fork else git clone https://github.com/vllm-project/vllm.git cd ./vllm/ - docker build -f Dockerfile.cpu -t opea/vllm:cpu --shm-size=128g . --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy + docker build -f Dockerfile.cpu -t opea/vllm-cpu:latest --shm-size=128g . --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy cd .. rm -rf vllm fi diff --git a/comps/llms/text-generation/vllm/langchain/dependency/build_docker_vllm_openvino.sh b/comps/llms/text-generation/vllm/langchain/dependency/build_docker_vllm_openvino.sh index 2640cf460c..c7ca87cacc 100644 --- a/comps/llms/text-generation/vllm/langchain/dependency/build_docker_vllm_openvino.sh +++ b/comps/llms/text-generation/vllm/langchain/dependency/build_docker_vllm_openvino.sh @@ -24,6 +24,6 @@ else BASEDIR="$( cd "$( dirname "$0" )" && pwd )" git clone https://github.com/vllm-project/vllm.git vllm cd ./vllm/ && git checkout v0.6.1 - docker build -t vllm:openvino -f Dockerfile.openvino . --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy + docker build -t vllm-openvino:latest -f Dockerfile.openvino . --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy cd $BASEDIR && rm -rf vllm fi diff --git a/comps/llms/text-generation/vllm/langchain/dependency/launch_vllm_service.sh b/comps/llms/text-generation/vllm/langchain/dependency/launch_vllm_service.sh index a5b2ceb3b0..421112b68f 100644 --- a/comps/llms/text-generation/vllm/langchain/dependency/launch_vllm_service.sh +++ b/comps/llms/text-generation/vllm/langchain/dependency/launch_vllm_service.sh @@ -38,7 +38,7 @@ volume=$PWD/data # Build the Docker run command based on hardware mode if [ "$hw_mode" = "hpu" ]; then - docker run -d --rm --runtime=habana --name="vllm-service" -p $port_number:80 -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice --ipc=host -e HTTPS_PROXY=$https_proxy -e HTTP_PROXY=$https_proxy -e HF_TOKEN=${HF_TOKEN} opea/vllm:hpu --enforce-eager --model $model_name --tensor-parallel-size $parallel_number --host 0.0.0.0 --port 80 --block-size $block_size --max-num-seqs $max_num_seqs --max-seq_len-to-capture $max_seq_len_to_capture + docker run -d --rm --runtime=habana --name="vllm-service" -p $port_number:80 -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice --ipc=host -e HTTPS_PROXY=$https_proxy -e HTTP_PROXY=$https_proxy -e HF_TOKEN=${HF_TOKEN} opea/vllm-hpu:latest --enforce-eager --model $model_name --tensor-parallel-size $parallel_number --host 0.0.0.0 --port 80 --block-size $block_size --max-num-seqs $max_num_seqs --max-seq_len-to-capture $max_seq_len_to_capture else - docker run -d --rm --name="vllm-service" -p $port_number:80 --network=host -v $volume:/data -e HTTPS_PROXY=$https_proxy -e HTTP_PROXY=$https_proxy -e HF_TOKEN=${HF_TOKEN} -e VLLM_CPU_KVCACHE_SPACE=40 opea/vllm:cpu --model $model_name --host 0.0.0.0 --port 80 + docker run -d --rm --name="vllm-service" -p $port_number:80 --network=host -v $volume:/data -e HTTPS_PROXY=$https_proxy -e HTTP_PROXY=$https_proxy -e HF_TOKEN=${HF_TOKEN} -e VLLM_CPU_KVCACHE_SPACE=40 opea/vllm-cpu:latest --model $model_name --host 0.0.0.0 --port 80 fi diff --git a/comps/llms/text-generation/vllm/langchain/docker_compose_llm.yaml b/comps/llms/text-generation/vllm/langchain/docker_compose_llm.yaml index acb620d164..cb0dc22164 100644 --- a/comps/llms/text-generation/vllm/langchain/docker_compose_llm.yaml +++ b/comps/llms/text-generation/vllm/langchain/docker_compose_llm.yaml @@ -5,7 +5,7 @@ version: "3.8" services: vllm-service: - image: opea/vllm:hpu + image: opea/vllm-hpu:latest container_name: vllm-gaudi-server ports: - "8008:80" diff --git a/comps/llms/text-generation/vllm/llama_index/README.md b/comps/llms/text-generation/vllm/llama_index/README.md index 8ee862d923..960b8ac14e 100644 --- a/comps/llms/text-generation/vllm/llama_index/README.md +++ b/comps/llms/text-generation/vllm/llama_index/README.md @@ -113,7 +113,7 @@ To build the docker image, run the command bash ./build_docker_vllm_openvino.sh ``` -Once it successfully builds, you will have the `vllm:openvino` image. It can be used to spawn a serving container with OpenAI API endpoint or you can work with it interactively via bash shell. +Once it successfully builds, you will have the `vllm-openvino` image. It can be used to spawn a serving container with OpenAI API endpoint or you can work with it interactively via bash shell. #### Launch vLLM service diff --git a/comps/llms/text-generation/vllm/llama_index/dependency/build_docker_vllm.sh b/comps/llms/text-generation/vllm/llama_index/dependency/build_docker_vllm.sh index 8b37fe048a..302cd8ee17 100644 --- a/comps/llms/text-generation/vllm/llama_index/dependency/build_docker_vllm.sh +++ b/comps/llms/text-generation/vllm/llama_index/dependency/build_docker_vllm.sh @@ -32,11 +32,11 @@ fi if [ "$hw_mode" = "hpu" ]; then git clone https://github.com/HabanaAI/vllm-fork.git cd ./vllm-fork/ - docker build -f Dockerfile.hpu -t opea/vllm:hpu --shm-size=128g . --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy + docker build -f Dockerfile.hpu -t opea/vllm-hpu:latest --shm-size=128g . --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy cd .. rm -rf vllm-fork else git clone https://github.com/vllm-project/vllm.git cd ./vllm/ - docker build -f Dockerfile.cpu -t opea/vllm:cpu --shm-size=128g . --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy + docker build -f Dockerfile.cpu -t opea/vllm-cpu:latest --shm-size=128g . --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy fi diff --git a/comps/llms/text-generation/vllm/llama_index/dependency/build_docker_vllm_openvino.sh b/comps/llms/text-generation/vllm/llama_index/dependency/build_docker_vllm_openvino.sh index 7384ac8f2a..d42878ebad 100644 --- a/comps/llms/text-generation/vllm/llama_index/dependency/build_docker_vllm_openvino.sh +++ b/comps/llms/text-generation/vllm/llama_index/dependency/build_docker_vllm_openvino.sh @@ -6,5 +6,5 @@ BASEDIR="$( cd "$( dirname "$0" )" && pwd )" git clone https://github.com/vllm-project/vllm.git vllm cd ./vllm/ && git checkout v0.6.1 -docker build -t vllm:openvino -f Dockerfile.openvino . --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy +docker build -t vllm-openvino:latest -f Dockerfile.openvino . --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy cd $BASEDIR && rm -rf vllm diff --git a/comps/llms/text-generation/vllm/llama_index/dependency/launch_vllm_service.sh b/comps/llms/text-generation/vllm/llama_index/dependency/launch_vllm_service.sh index bdf46889fd..300d8a551c 100644 --- a/comps/llms/text-generation/vllm/llama_index/dependency/launch_vllm_service.sh +++ b/comps/llms/text-generation/vllm/llama_index/dependency/launch_vllm_service.sh @@ -38,7 +38,7 @@ volume=$PWD/data # Build the Docker run command based on hardware mode if [ "$hw_mode" = "hpu" ]; then - docker run -d --rm --runtime=habana --name="vllm-service" -p $port_number:80 -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice --ipc=host -e HTTPS_PROXY=$https_proxy -e HTTP_PROXY=$https_proxy -e HF_TOKEN=${HUGGINGFACEHUB_API_TOKEN} opea/vllm:hpu --enforce-eager --model $model_name --tensor-parallel-size $parallel_number --host 0.0.0.0 --port 80 --block-size $block_size --max-num-seqs $max_num_seqs --max-seq_len-to-capture $max_seq_len_to_capture + docker run -d --rm --runtime=habana --name="vllm-service" -p $port_number:80 -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice --ipc=host -e HTTPS_PROXY=$https_proxy -e HTTP_PROXY=$https_proxy -e HF_TOKEN=${HUGGINGFACEHUB_API_TOKEN} opea/vllm-hpu:latest --enforce-eager --model $model_name --tensor-parallel-size $parallel_number --host 0.0.0.0 --port 80 --block-size $block_size --max-num-seqs $max_num_seqs --max-seq_len-to-capture $max_seq_len_to_capture else - docker run -d --rm --name="vllm-service" -p $port_number:80 --network=host -v $volume:/data -e HTTPS_PROXY=$https_proxy -e HTTP_PROXY=$https_proxy -e HF_TOKEN=${HUGGINGFACEHUB_API_TOKEN} -e VLLM_CPU_KVCACHE_SPACE=40 opea/vllm:cpu --model $model_name --host 0.0.0.0 --port 80 + docker run -d --rm --name="vllm-service" -p $port_number:80 --network=host -v $volume:/data -e HTTPS_PROXY=$https_proxy -e HTTP_PROXY=$https_proxy -e HF_TOKEN=${HUGGINGFACEHUB_API_TOKEN} -e VLLM_CPU_KVCACHE_SPACE=40 opea/vllm-cpu:latest --model $model_name --host 0.0.0.0 --port 80 fi diff --git a/comps/llms/text-generation/vllm/llama_index/dependency/launch_vllm_service_openvino.sh b/comps/llms/text-generation/vllm/llama_index/dependency/launch_vllm_service_openvino.sh index d54970877b..18ce714dae 100644 --- a/comps/llms/text-generation/vllm/llama_index/dependency/launch_vllm_service_openvino.sh +++ b/comps/llms/text-generation/vllm/llama_index/dependency/launch_vllm_service_openvino.sh @@ -52,7 +52,7 @@ docker run -d --rm --name="vllm-openvino-server" \ -e HTTP_PROXY=$https_proxy \ -e HF_TOKEN=${HUGGINGFACEHUB_API_TOKEN} \ -v $HOME/.cache/huggingface:/home/user/.cache/huggingface \ - vllm:openvino /bin/bash -c "\ + vllm-openvino:latest /bin/bash -c "\ cd / && \ export VLLM_CPU_KVCACHE_SPACE=50 && \ python3 -m vllm.entrypoints.openai.api_server \ diff --git a/comps/llms/text-generation/vllm/llama_index/docker_compose_llm.yaml b/comps/llms/text-generation/vllm/llama_index/docker_compose_llm.yaml index 94358acc66..e6ccae55fa 100644 --- a/comps/llms/text-generation/vllm/llama_index/docker_compose_llm.yaml +++ b/comps/llms/text-generation/vllm/llama_index/docker_compose_llm.yaml @@ -5,7 +5,7 @@ version: "3.8" services: vllm-service: - image: opea/vllm:hpu + image: opea/vllm-hpu:latest container_name: vllm-gaudi-server ports: - "8008:80"