Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: chensuyue <[email protected]>
  • Loading branch information
chensuyue committed Sep 11, 2024
1 parent 3ca1491 commit 76b37f1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/llms/test_llms_text-generation_tgi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function start_service() {
export your_hf_llm_model=$1
# Remember to set HF_TOKEN before invoking this test!
export HF_TOKEN=${HF_TOKEN}
docker run -d --name="test-comps-llm-tgi-endpoint" -p $tgi_endpoint_port:80 -v ./data:/data --shm-size 1g -e HF_TOKEN=${HF_TOKEN} ghcr.io/huggingface/text-generation-inference:2.1.0 --model-id ${your_hf_llm_model} --max-input-tokens 1024 --max-total-tokens 2048
docker run -d --name="test-comps-llm-tgi-endpoint" -p $tgi_endpoint_port:80 -v ~/.cache/huggingface/hub:/data --shm-size 1g -e HF_TOKEN=${HF_TOKEN} ghcr.io/huggingface/text-generation-inference:2.1.0 --model-id ${your_hf_llm_model} --max-input-tokens 1024 --max-total-tokens 2048
export TGI_LLM_ENDPOINT="http://${ip_address}:${tgi_endpoint_port}"

llm_port=5005
Expand All @@ -34,7 +34,7 @@ function start_service() {
# check whether tgi is fully ready
n=0
until [[ "$n" -ge 100 ]] || [[ $ready == true ]]; do
docker logs test-comps-llm-tgi-endpoint >> ${LOG_PATH}/llm-tgi.log
docker logs test-comps-llm-tgi-endpoint >> ${LOG_PATH}/${your_hf_llm_model}-llm-tgi.log
n=$((n+1))
if grep -q Connected ${LOG_PATH}/llm-tgi.log; then
break
Expand Down
2 changes: 1 addition & 1 deletion tests/retrievers/test_retrievers_pinecone_langchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function start_service() {
export HUGGINGFACEHUB_API_TOKEN=$HF_TOKEN
retriever_port=5054
unset http_proxy
docker run -d --name="test-comps-retriever-pinecone-server" -p ${retriever_port}:7000 --ipc=host -e TEI_EMBEDDING_ENDPOINT=$TEI_EMBEDDING_ENDPOINT -e http_proxy=$http_proxy -e https_proxy=$https_proxy -e PINECONE_API_KEY=$PINECONE_API_KEY -e PINECONE_INDEX_NAME=$PINECONE_INDEX_NAME -e INDEX_NAME=$PINECONE_INDEX_NAME opea/retriever-pinecone:comps
docker run -d --name="test-comps-retriever-pinecone-server" -p ${retriever_port}:7000 --ipc=host -e HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN} -e TEI_EMBEDDING_ENDPOINT=$TEI_EMBEDDING_ENDPOINT -e http_proxy=$http_proxy -e https_proxy=$https_proxy -e PINECONE_API_KEY=$PINECONE_API_KEY -e PINECONE_INDEX_NAME=$PINECONE_INDEX_NAME -e INDEX_NAME=$PINECONE_INDEX_NAME opea/retriever-pinecone:comps

sleep 2m
}
Expand Down
3 changes: 2 additions & 1 deletion tests/retrievers/test_retrievers_redis_langchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ function start_service() {
# redis retriever
export REDIS_URL="redis://${ip_address}:5010"
export INDEX_NAME="rag-redis"
export HUGGINGFACEHUB_API_TOKEN=$HF_TOKEN
retriever_port=5435
# unset http_proxy
docker run -d --name="test-comps-retriever-redis-server" -p ${retriever_port}:7000 --ipc=host -e TEI_EMBEDDING_ENDPOINT=$TEI_EMBEDDING_ENDPOINT -e http_proxy=$http_proxy -e https_proxy=$https_proxy -e REDIS_URL=$REDIS_URL -e INDEX_NAME=$INDEX_NAME opea/retriever-redis:comps
docker run -d --name="test-comps-retriever-redis-server" -p ${retriever_port}:7000 --ipc=host -e HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN} -e TEI_EMBEDDING_ENDPOINT=$TEI_EMBEDDING_ENDPOINT -e http_proxy=$http_proxy -e https_proxy=$https_proxy -e REDIS_URL=$REDIS_URL -e INDEX_NAME=$INDEX_NAME opea/retriever-redis:comps

sleep 3m
}
Expand Down

0 comments on commit 76b37f1

Please sign in to comment.