Skip to content

Commit f4b0298

Browse files
authored
fix requirements (#284)
Signed-off-by: chensuyue <suyue.chen@intel.com>
1 parent f236949 commit f4b0298

5 files changed

Lines changed: 20 additions & 6 deletions

File tree

.github/workflows/scripts/docker_images_build_push.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ case ${micro_service} in
3939
"retrievers/langchain")
4040
IMAGE_NAME="opea/retriever-redis"
4141
;;
42-
"reranks/langchain")
42+
"reranks/tei")
4343
IMAGE_NAME="opea/reranking-tei"
4444
;;
4545
"llms/text-generation/tgi")

comps/llms/text-generation/tgi/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
aiohttp
12
docarray[full]
23
fastapi
4+
httpx
35
huggingface_hub
46
langsmith
57
opentelemetry-api

comps/reranks/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
aiohttp
12
docarray[full]
23
fastapi
4+
httpx
35
langsmith
46
opentelemetry-api
57
opentelemetry-exporter-otlp

comps/retrievers/llamaindex/requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
aiohttp
12
docarray[full]
23
easyocr
34
fastapi
5+
httpx
46
langsmith
57
llama-index-vector-stores-redis
68
llama_index
@@ -11,3 +13,4 @@ pymupdf
1113
redis
1214
sentence_transformers
1315
shortuuid
16+
Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ WORKPATH=$(dirname "$PWD")
88
ip_address=$(hostname -I | awk '{print $1}')
99
function build_docker_images() {
1010
cd $WORKPATH
11-
docker build --no-cache -t opea/reranking-tei:comps -f comps/reranks/langchain/docker/Dockerfile .
11+
docker build --no-cache -t opea/reranking-tei:comps -f comps/reranks/tei/docker/Dockerfile .
1212
}
1313

1414
function start_service() {
@@ -29,12 +29,19 @@ function start_service() {
2929

3030
function validate_microservice() {
3131
tei_service_port=5007
32-
http_proxy="" curl http://${ip_address}:${tei_service_port}/v1/reranking\
32+
local CONTENT=$(curl http://${ip_address}:${tei_service_port}/v1/reranking \
3333
-X POST \
3434
-d '{"initial_query":"What is Deep Learning?", "retrieved_docs": [{"text":"Deep Learning is not..."}, {"text":"Deep learning is..."}]}' \
35-
-H 'Content-Type: application/json'
36-
docker logs test-comps-reranking-tei-server
37-
docker logs test-comps-reranking-tei-endpoint
35+
-H 'Content-Type: application/json')
36+
37+
if echo "$CONTENT" | grep -q "### Search results:"; then
38+
echo "Content is as expected."
39+
else
40+
echo "Content does not match the expected result: $CONTENT"
41+
docker logs test-comps-reranking-tei-server
42+
docker logs test-comps-reranking-tei-endpoint
43+
exit 1
44+
fi
3845
}
3946

4047
function stop_docker() {

0 commit comments

Comments
 (0)