Skip to content

Commit 385b8dd

Browse files
committed
Merge branch 'main' into helm-ci
2 parents 1f2a168 + 195ed91 commit 385b8dd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1172
-362
lines changed

.github/workflows/_run-helm-chart.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ jobs:
155155
exit 0
156156
fi
157157
158-
if ! helm install --create-namespace --namespace $NAMESPACE $RELEASE_NAME oci://ghcr.io/opea-project/charts/${CHART_NAME} --set global.HUGGINGFACEHUB_API_TOKEN=${HFTOKEN} -f comps/${{ inputs.service }}/deployment/kubernetes/${value_file} --version 0-latest ; then
158+
if ! helm install --create-namespace --namespace $NAMESPACE $RELEASE_NAME oci://ghcr.io/opea-project/charts/${CHART_NAME} --set global.HUGGINGFACEHUB_API_TOKEN=${HFTOKEN} --set global.modelUseHostPath=/home/sdp/.cache/huggingface/hub -f comps/${{ inputs.service }}/deployment/kubernetes/${value_file} --version 0-latest --wait; then
159159
echo "Failed to install chart ${{ inputs.service }}"
160160
echo "skip_validate=true" >> $GITHUB_ENV
161161
.github/workflows/scripts/k8s-utils.sh dump_pods_status $NAMESPACE

.github/workflows/docker/compose/llms-compose.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ services:
1111
build:
1212
dockerfile: comps/llms/src/text-generation/Dockerfile.intel_hpu
1313
image: ${REGISTRY:-opea}/llm-textgen-gaudi:${TAG:-latest}
14-
llm-ollama:
15-
build:
16-
dockerfile: comps/llms/text-generation/ollama/langchain/Dockerfile
17-
image: ${REGISTRY:-opea}/llm-ollama:${TAG:-latest}
1814
llm-docsum:
1915
build:
2016
dockerfile: comps/llms/src/doc-summarization/Dockerfile

.github/workflows/pr-link-path-scan.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ jobs:
139139
fi
140140
fi
141141
else
142-
echo "$check_path does not exist"
142+
echo "Invalid reference path from $refer_path, reference path: $(echo $png_line | cut -d ']' -f2)"
143143
fail="TRUE"
144144
fi
145145
done

.github/workflows/pr-microservice-test.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,24 @@ jobs:
3333
- name: Clean Up Working Directory
3434
run: |
3535
sudo rm -rf ${{github.workspace}}/*
36-
docker system prune -f
36+
cid=$(docker ps -aq --filter "name=test-comps-*")
37+
if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
3738
docker rmi $(docker images --filter reference="*/*:comps" -q) || true
39+
docker system prune -f
40+
docker ps
3841
3942
- name: Checkout out Repo
4043
uses: actions/checkout@v4
4144
with:
4245
ref: "refs/pull/${{ github.event.number }}/merge"
4346

47+
- name: Get AWS Credentials
48+
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502
49+
if: ${{ contains(matrix.service, 'bedrock') }}
50+
with:
51+
role-to-assume: ${{ secrets.AWS_IAM_ROLE_ARN }}
52+
aws-region: us-east-1
53+
4454
- name: Run microservice test
4555
env:
4656
HF_TOKEN: ${{ secrets.HF_TOKEN }}
@@ -56,7 +66,6 @@ jobs:
5666
timeout 60m bash $(find . -type f -name test_${service}.sh)
5767
5868
- name: Clean up container
59-
if: cancelled() || failure()
6069
run: |
6170
cid=$(docker ps -aq --filter "name=test-comps-*")
6271
if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi

comps/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# Copyright (C) 2024 Intel Corporation
44
# SPDX-License-Identifier: Apache-2.0
55

6+
import os
7+
68
# Document
79
from comps.cores.proto.docarray import (
810
Audio2TextDoc,
@@ -49,7 +51,8 @@
4951
from comps.cores.mega.micro_service import MicroService, register_microservice, opea_microservices
5052

5153
# Telemetry
52-
from comps.cores.telemetry.opea_telemetry import opea_telemetry
54+
if os.getenv("ENABLE_OPEA_TELEMETRY", "false").lower() == "true":
55+
from comps.cores.telemetry.opea_telemetry import opea_telemetry
5356

5457
# Common
5558
from comps.cores.common.component import OpeaComponent, OpeaComponentRegistry, OpeaComponentLoader

comps/asr/src/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ Alternatively, you can also start the ASR microservice with Docker.
7474

7575
```bash
7676
cd ../..
77-
docker build -t opea/whisper:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/asr/src/integrations/dependency/Dockerfile .
77+
docker build -t opea/whisper:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/asr/src/integrations/dependency/whisper/Dockerfile .
7878
```
7979

8080
- Gaudi2 HPU
8181

8282
```bash
8383
cd ../..
84-
docker build -t opea/whisper-gaudi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/asr/src/integrations/dependency/Dockerfile.intel_hpu .
84+
docker build -t opea/whisper-gaudi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/asr/src/integrations/dependency/whisper/Dockerfile.intel_hpu .
8585
```
8686

8787
#### 2.1.2 ASR Service Image

comps/cores/proto/docarray.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ class GraphDoc(BaseDoc):
278278

279279

280280
class LVMDoc(BaseDoc):
281-
image: str
281+
image: Union[str, List[str]]
282282
prompt: str
283283
max_new_tokens: conint(ge=0, le=1024) = 512
284284
top_k: int = 10

comps/dataprep/multimodal/redis/langchain/README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ This `dataprep` microservice accepts the following from the user and ingests the
55
- Videos (mp4 files) and their transcripts (optional)
66
- Images (gif, jpg, jpeg, and png files) and their captions (optional)
77
- Audio (wav files)
8+
- PDFs (with text and images)
89

910
## 🚀1. Start Microservice with Python(Option 1)
1011

@@ -111,18 +112,19 @@ docker container logs -f dataprep-multimodal-redis
111112

112113
## 🚀4. Consume Microservice
113114

114-
Once this dataprep microservice is started, user can use the below commands to invoke the microservice to convert images and videos and their transcripts (optional) to embeddings and save to the Redis vector store.
115+
Once this dataprep microservice is started, user can use the below commands to invoke the microservice to convert images, videos, text, and PDF files to embeddings and save to the Redis vector store.
115116

116117
This microservice provides 3 different ways for users to ingest files into Redis vector store corresponding to the 3 use cases.
117118

118119
### 4.1 Consume _ingest_with_text_ API
119120

120-
**Use case:** This API is used when videos are accompanied by transcript files (`.vtt` format) or images are accompanied by text caption files (`.txt` format).
121+
**Use case:** This API is used for videos accompanied by transcript files (`.vtt` format), images accompanied by text caption files (`.txt` format), and PDF files containing a mix of text and images.
121122

122123
**Important notes:**
123124

124125
- Make sure the file paths after `files=@` are correct.
125126
- Every transcript or caption file's name must be identical to its corresponding video or image file's name (except their extension - .vtt goes with .mp4 and .txt goes with .jpg, .jpeg, .png, or .gif). For example, `video1.mp4` and `video1.vtt`. Otherwise, if `video1.vtt` is not included correctly in the API call, the microservice will return an error `No captions file video1.vtt found for video1.mp4`.
127+
- It is assumed that PDFs will contain at least one image. Each image in the file will be embedded along with the text that appears on the same page as the image.
126128

127129
#### Single video-transcript pair upload
128130

@@ -157,6 +159,7 @@ curl -X POST \
157159
-F "files=@./image1.txt" \
158160
-F "files=@./image2.jpg" \
159161
-F "files=@./image2.txt" \
162+
-F "files=@./example.pdf" \
160163
http://localhost:6007/v1/ingest_with_text
161164
```
162165

0 commit comments

Comments
 (0)