diff --git a/.github/workflows/docker-compose-e2e.yml b/.github/workflows/docker-compose-e2e.yml
index b22207b6ba..fee4965e10 100644
--- a/.github/workflows/docker-compose-e2e.yml
+++ b/.github/workflows/docker-compose-e2e.yml
@@ -80,11 +80,7 @@ jobs:
if: cancelled() || failure()
run: |
cd ${{ github.workspace }}/$example/docker/$hardware
- container_list=$(cat docker_compose.yaml | grep container_name | cut -d':' -f2)
- for container_name in $container_list; do
- cid=$(docker ps -aq --filter "name=$container_name")
- if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
- done
+ docker compose stop && docker compose rm -f
echo y | docker system prune
- name: Publish pipeline artifact
diff --git a/AudioQnA/docker/gaudi/README.md b/AudioQnA/docker/gaudi/README.md
index d896dba1ca..999a1ac4eb 100644
--- a/AudioQnA/docker/gaudi/README.md
+++ b/AudioQnA/docker/gaudi/README.md
@@ -81,7 +81,7 @@ export LLM_SERVICE_PORT=3007
```bash
cd GenAIExamples/AudioQnA/docker/gaudi/
-docker compose -f docker_compose.yaml up -d
+docker compose up -d
```
## 🚀 Test MicroServices
diff --git a/AudioQnA/docker/gaudi/docker_compose.yaml b/AudioQnA/docker/gaudi/compose.yaml
similarity index 100%
rename from AudioQnA/docker/gaudi/docker_compose.yaml
rename to AudioQnA/docker/gaudi/compose.yaml
diff --git a/AudioQnA/docker/xeon/README.md b/AudioQnA/docker/xeon/README.md
index 1e88182a98..3537906e14 100644
--- a/AudioQnA/docker/xeon/README.md
+++ b/AudioQnA/docker/xeon/README.md
@@ -81,7 +81,7 @@ export LLM_SERVICE_PORT=3007
```bash
cd GenAIExamples/AudioQnA/docker/xeon/
-docker compose -f docker_compose.yaml up -d
+docker compose up -d
```
## 🚀 Test MicroServices
diff --git a/AudioQnA/docker/xeon/docker_compose.yaml b/AudioQnA/docker/xeon/compose.yaml
similarity index 100%
rename from AudioQnA/docker/xeon/docker_compose.yaml
rename to AudioQnA/docker/xeon/compose.yaml
diff --git a/AudioQnA/tests/test_audioqna_on_gaudi.sh b/AudioQnA/tests/test_audioqna_on_gaudi.sh
index 13991d1f22..4c0aa3d394 100644
--- a/AudioQnA/tests/test_audioqna_on_gaudi.sh
+++ b/AudioQnA/tests/test_audioqna_on_gaudi.sh
@@ -58,15 +58,15 @@ function start_services() {
if [[ "$IMAGE_REPO" != "" ]]; then
# Replace the container name with a test-specific name
echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
- sed -i "s#image: opea/audioqna:latest#image: opea/audioqna:${IMAGE_TAG}#g" docker_compose.yaml
- sed -i "s#image: opea/audioqna-ui:latest#image: opea/audioqna-ui:${IMAGE_TAG}#g" docker_compose.yaml
- sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" docker_compose.yaml
- echo "cat docker_compose.yaml"
- cat docker_compose.yaml
+ sed -i "s#image: opea/audioqna:latest#image: opea/audioqna:${IMAGE_TAG}#g" compose.yaml
+ sed -i "s#image: opea/audioqna-ui:latest#image: opea/audioqna-ui:${IMAGE_TAG}#g" compose.yaml
+ sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
+ echo "cat compose.yaml"
+ cat compose.yaml
fi
# Start Docker Containers
- docker compose -f docker_compose.yaml up -d
+ docker compose up -d
n=0
until [[ "$n" -ge 500 ]]; do
docker logs tgi-gaudi-server > $LOG_PATH/tgi_service_start.log
@@ -125,11 +125,7 @@ function validate_megaservice() {
function stop_docker() {
cd $WORKPATH/docker/gaudi
- container_list=$(cat docker_compose.yaml | grep container_name | cut -d':' -f2)
- for container_name in $container_list; do
- cid=$(docker ps -aq --filter "name=$container_name")
- if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
- done
+ docker compose stop && docker compose rm -f
}
function main() {
diff --git a/AudioQnA/tests/test_audioqna_on_xeon.sh b/AudioQnA/tests/test_audioqna_on_xeon.sh
index d80c6ded1b..6c42e3f7c5 100644
--- a/AudioQnA/tests/test_audioqna_on_xeon.sh
+++ b/AudioQnA/tests/test_audioqna_on_xeon.sh
@@ -54,29 +54,30 @@ function start_services() {
if [[ "$IMAGE_REPO" != "" ]]; then
# Replace the container name with a test-specific name
echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
- sed -i "s#image: opea/audioqna:latest#image: opea/audioqna:${IMAGE_TAG}#g" docker_compose.yaml
- sed -i "s#image: opea/audioqna-ui:latest#image: opea/audioqna-ui:${IMAGE_TAG}#g" docker_compose.yaml
- sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" docker_compose.yaml
- echo "cat docker_compose.yaml"
- cat docker_compose.yaml
+ sed -i "s#image: opea/audioqna:latest#image: opea/audioqna:${IMAGE_TAG}#g" compose.yaml
+ sed -i "s#image: opea/audioqna-ui:latest#image: opea/audioqna-ui:${IMAGE_TAG}#g" compose.yaml
+ sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
+ echo "cat compose.yaml"
+ cat compose.yaml
fi
# Start Docker Containers
- docker compose -f docker_compose.yaml up -d
- n=0
- until [[ "$n" -ge 200 ]]; do
- docker logs tgi-service > $LOG_PATH/tgi_service_start.log
- if grep -q Connected $LOG_PATH/tgi_service_start.log; then
- break
- fi
- sleep 1s
- n=$((n+1))
- done
+ docker compose up -d
+ n=0
+ until [[ "$n" -ge 200 ]]; do
+ docker logs tgi-service > $LOG_PATH/tgi_service_start.log
+ if grep -q Connected $LOG_PATH/tgi_service_start.log; then
+ break
+ fi
+ sleep 1s
+ n=$((n+1))
+ done
}
function validate_megaservice() {
result=$(http_proxy="" curl http://${ip_address}:3008/v1/audioqna -XPOST -d '{"audio": "UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA", "max_tokens":64}' -H 'Content-Type: application/json')
+ echo $result
if [[ $result == *"AAA"* ]]; then
echo "Result correct."
else
@@ -113,11 +114,7 @@ function validate_megaservice() {
function stop_docker() {
cd $WORKPATH/docker/xeon
- container_list=$(cat docker_compose.yaml | grep container_name | cut -d':' -f2)
- for container_name in $container_list; do
- cid=$(docker ps -aq --filter "name=$container_name")
- if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
- done
+ docker compose stop && docker compose rm -f
}
function main() {
diff --git a/ChatQnA/README.md b/ChatQnA/README.md
index 7b243346de..c96e97e4d2 100644
--- a/ChatQnA/README.md
+++ b/ChatQnA/README.md
@@ -28,7 +28,7 @@ docker pull opea/chatqna:latest
Two type of UI are supported now, choose one you like and pull the referred docker image.
-If you choose conversational UI, follow the [instruction](https://github.com/opea-project/GenAIExamples/tree/main/ChatQnA/docker/gaudi#-launch-the-conversational-ui-optional) and modify the [docker_compose.yaml](./docker/xeon/docker_compose.yaml).
+If you choose conversational UI, follow the [instruction](https://github.com/opea-project/GenAIExamples/tree/main/ChatQnA/docker/gaudi#-launch-the-conversational-ui-optional) and modify the [compose.yaml](./docker/xeon/compose.yaml).
```bash
docker pull opea/chatqna-ui:latest
@@ -74,11 +74,11 @@ source ./docker/gpu/set_env.sh
## Deploy ChatQnA on Gaudi
-Please find corresponding [docker_compose.yaml](./docker/gaudi/docker_compose.yaml).
+Please find corresponding [compose.yaml](./docker/gaudi/compose.yaml).
```bash
cd GenAIExamples/ChatQnA/docker/gaudi/
-docker compose -f docker_compose.yaml up -d
+docker compose up -d
```
> Notice: Currently only the Habana Driver 1.16.x is supported for Gaudi.
@@ -87,11 +87,11 @@ Please refer to the [Gaudi Guide](./docker/gaudi/README.md) to build docker imag
## Deploy ChatQnA on Xeon
-Please find corresponding [docker_compose.yaml](./docker/xeon/docker_compose.yaml).
+Please find corresponding [compose.yaml](./docker/xeon/compose.yaml).
```bash
cd GenAIExamples/ChatQnA/docker/xeon/
-docker compose -f docker_compose.yaml up -d
+docker compose up -d
```
Refer to the [Xeon Guide](./docker/xeon/README.md) for more instructions on building docker images from source.
@@ -100,7 +100,7 @@ Refer to the [Xeon Guide](./docker/xeon/README.md) for more instructions on buil
```bash
cd GenAIExamples/ChatQnA/docker/gpu/
-docker compose -f docker_compose.yaml up -d
+docker compose up -d
```
Refer to the [NVIDIA GPU Guide](./docker/gpu/README.md) for more instructions on building docker images from source.
@@ -153,6 +153,6 @@ If you choose conversational UI, use this URL: `http://{host_ip}:5174`
http_proxy="" curl ${host_ip}:6006/embed -X POST -d '{"inputs":"What is Deep Learning?"}' -H 'Content-Type: application/json'
```
-2. (Docker only) If all microservices work well, please check the port ${host_ip}:8888, the port may be allocated by other users, you can modify the `docker_compose.yaml`.
+2. (Docker only) If all microservices work well, please check the port ${host_ip}:8888, the port may be allocated by other users, you can modify the `compose.yaml`.
-3. (Docker only) If you get errors like "The container name is in use", please change container name in `docker_compose.yaml`.
+3. (Docker only) If you get errors like "The container name is in use", please change container name in `compose.yaml`.
diff --git a/ChatQnA/chatqna.yaml b/ChatQnA/chatqna.yaml
index d95364141e..32cc433a7c 100644
--- a/ChatQnA/chatqna.yaml
+++ b/ChatQnA/chatqna.yaml
@@ -45,7 +45,7 @@ opea_micro_services:
ports: ${RERANK_SERVICE_PORT}
image: opea/reranking-tei:latest
endpoint: /v1/reranking
- tgi_service:
+ tgi-service:
host: ${TGI_SERVICE_IP}
ports: ${TGI_SERVICE_PORT}
image: ghcr.io/huggingface/tgi-gaudi:2.0.1
diff --git a/ChatQnA/docker/aipc/README.md b/ChatQnA/docker/aipc/README.md
index b3a347045a..5396421c07 100644
--- a/ChatQnA/docker/aipc/README.md
+++ b/ChatQnA/docker/aipc/README.md
@@ -79,7 +79,7 @@ Then run the command `docker images`, you will have the following 7 Docker Image
### Setup Environment Variables
-Since the `docker_compose.yaml` will consume some environment variables, you need to setup them in advance as below.
+Since the `compose.yaml` will consume some environment variables, you need to setup them in advance as below.
**Export the value of the public IP address of your AIPC to the `host_ip` environment variable**
@@ -160,7 +160,7 @@ Note: Please replace with `host_ip` with you external IP address, do not use loc
```bash
cd GenAIExamples/ChatQnA/docker/aipc/
-docker compose -f docker_compose.yaml up -d
+docker compose up -d
# let ollama service runs
# e.g. ollama run llama3
diff --git a/ChatQnA/docker/aipc/docker_compose.yaml b/ChatQnA/docker/aipc/compose.yaml
similarity index 100%
rename from ChatQnA/docker/aipc/docker_compose.yaml
rename to ChatQnA/docker/aipc/compose.yaml
diff --git a/ChatQnA/docker/gaudi/README.md b/ChatQnA/docker/gaudi/README.md
index 4586b883d6..c372f04e5d 100644
--- a/ChatQnA/docker/gaudi/README.md
+++ b/ChatQnA/docker/gaudi/README.md
@@ -177,7 +177,7 @@ If Guardrails docker image is built, you will find one more image:
### Setup Environment Variables
-Since the `docker_compose.yaml` will consume some environment variables, you need to setup them in advance as below.
+Since the `compose.yaml` will consume some environment variables, you need to setup them in advance as below.
```bash
export no_proxy=${your_no_proxy}
@@ -227,32 +227,32 @@ cd GenAIExamples/ChatQnA/docker/gaudi/
If use tgi for llm backend.
```bash
-docker compose -f docker_compose.yaml up -d
+docker compose -f compose.yaml up -d
```
If use vllm for llm backend.
```bash
-docker compose -f docker_compose_vllm.yaml up -d
+docker compose -f compose_vllm.yaml up -d
```
If use vllm-on-ray for llm backend.
```bash
-docker compose -f docker_compose_vllm_ray.yaml up -d
+docker compose -f compose_vllm_ray.yaml up -d
```
If use ray serve for llm backend.
```bash
-docker compose -f docker_compose_ray_serve.yaml up -d
+docker compose -f compose_ray_serve.yaml up -d
```
If you want to enable guardrails microservice in the pipeline, please follow the below command instead:
```bash
cd GenAIExamples/ChatQnA/docker/gaudi/
-docker compose -f docker_compose_guardrails.yaml up -d
+docker compose -f compose_guardrails.yaml up -d
```
### Validate MicroServices and MegaService
@@ -426,7 +426,7 @@ curl http://${host_ip}:9090/v1/guardrails\
## Enable LangSmith for Monotoring Application (Optional)
-LangSmith offers tools to debug, evaluate, and monitor language models and intelligent agents. It can be used to assess benchmark data for each microservice. Before launching your services with `docker compose -f docker_compose.yaml up -d`, you need to enable LangSmith tracing by setting the `LANGCHAIN_TRACING_V2` environment variable to true and configuring your LangChain API key.
+LangSmith offers tools to debug, evaluate, and monitor language models and intelligent agents. It can be used to assess benchmark data for each microservice. Before launching your services with `docker compose -f compose.yaml up -d`, you need to enable LangSmith tracing by setting the `LANGCHAIN_TRACING_V2` environment variable to true and configuring your LangChain API key.
Here's how you can do it:
@@ -445,7 +445,7 @@ export LANGCHAIN_API_KEY=ls_...
## 🚀 Launch the UI
-To access the frontend, open the following URL in your browser: http://{host_ip}:5173. By default, the UI runs on port 5173 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `docker_compose.yaml` file as shown below:
+To access the frontend, open the following URL in your browser: http://{host_ip}:5173. By default, the UI runs on port 5173 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `compose.yaml` file as shown below:
```yaml
chaqna-gaudi-ui-server:
@@ -463,7 +463,7 @@ Here is an example of running ChatQnA:
## 🚀 Launch the Conversational UI (Optional)
-To access the Conversational UI (react based) frontend, modify the UI service in the `docker_compose.yaml` file. Replace `chaqna-gaudi-ui-server` service with the `chatqna-gaudi-conversation-ui-server` service as per the config below:
+To access the Conversational UI (react based) frontend, modify the UI service in the `compose.yaml` file. Replace `chaqna-gaudi-ui-server` service with the `chatqna-gaudi-conversation-ui-server` service as per the config below:
```yaml
chaqna-gaudi-conversation-ui-server:
@@ -481,7 +481,7 @@ chaqna-gaudi-conversation-ui-server:
restart: always
```
-Once the services are up, open the following URL in your browser: http://{host_ip}:5174. By default, the UI runs on port 80 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `docker_compose.yaml` file as shown below:
+Once the services are up, open the following URL in your browser: http://{host_ip}:5174. By default, the UI runs on port 80 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `compose.yaml` file as shown below:
```yaml
chaqna-gaudi-conversation-ui-server:
diff --git a/ChatQnA/docker/gaudi/docker_compose.yaml b/ChatQnA/docker/gaudi/compose.yaml
similarity index 100%
rename from ChatQnA/docker/gaudi/docker_compose.yaml
rename to ChatQnA/docker/gaudi/compose.yaml
diff --git a/ChatQnA/docker/gaudi/docker_compose_guardrails.yaml b/ChatQnA/docker/gaudi/compose_guardrails.yaml
similarity index 100%
rename from ChatQnA/docker/gaudi/docker_compose_guardrails.yaml
rename to ChatQnA/docker/gaudi/compose_guardrails.yaml
diff --git a/ChatQnA/docker/gaudi/docker_compose_ray_serve.yaml b/ChatQnA/docker/gaudi/compose_ray_serve.yaml
similarity index 100%
rename from ChatQnA/docker/gaudi/docker_compose_ray_serve.yaml
rename to ChatQnA/docker/gaudi/compose_ray_serve.yaml
diff --git a/ChatQnA/docker/gaudi/docker_compose_vllm.yaml b/ChatQnA/docker/gaudi/compose_vllm.yaml
similarity index 100%
rename from ChatQnA/docker/gaudi/docker_compose_vllm.yaml
rename to ChatQnA/docker/gaudi/compose_vllm.yaml
diff --git a/ChatQnA/docker/gaudi/docker_compose_vllm_ray.yaml b/ChatQnA/docker/gaudi/compose_vllm_ray.yaml
similarity index 100%
rename from ChatQnA/docker/gaudi/docker_compose_vllm_ray.yaml
rename to ChatQnA/docker/gaudi/compose_vllm_ray.yaml
diff --git a/ChatQnA/docker/gaudi/how_to_validate_service.md b/ChatQnA/docker/gaudi/how_to_validate_service.md
index 04f0204028..0e58491eb8 100644
--- a/ChatQnA/docker/gaudi/how_to_validate_service.md
+++ b/ChatQnA/docker/gaudi/how_to_validate_service.md
@@ -17,15 +17,15 @@ start the docker containers
```
cd ./GenAIExamples/ChatQnA/docker/gaudi
-docker compose -f ./docker_compose.yaml up -d
+docker compose up -d
```
-Check the start up log by `docker compose -f ./docker/gaudi/docker_compose.yaml logs`.
-Where the docker_compose.yaml file is the mega service docker-compose configuration.
+Check the start up log by `docker compose -f ./docker/gaudi/compose.yaml logs`.
+Where the compose.yaml file is the mega service docker-compose configuration.
The warning messages point out the veriabls are **NOT** set.
```
-ubuntu@gaudi-vm:~/GenAIExamples/ChatQnA/docker/gaudi$ docker compose -f ./docker_compose.yaml up -d
+ubuntu@gaudi-vm:~/GenAIExamples/ChatQnA/docker/gaudi$ docker compose -f ./compose.yaml up -d
WARN[0000] The "LANGCHAIN_API_KEY" variable is not set. Defaulting to a blank string.
WARN[0000] The "LANGCHAIN_TRACING_V2" variable is not set. Defaulting to a blank string.
WARN[0000] The "LANGCHAIN_API_KEY" variable is not set. Defaulting to a blank string.
@@ -34,7 +34,7 @@ WARN[0000] The "LANGCHAIN_API_KEY" variable is not set. Defaulting to a blank st
WARN[0000] The "LANGCHAIN_TRACING_V2" variable is not set. Defaulting to a blank string.
WARN[0000] The "LANGCHAIN_API_KEY" variable is not set. Defaulting to a blank string.
WARN[0000] The "LANGCHAIN_TRACING_V2" variable is not set. Defaulting to a blank string.
-WARN[0000] /home/ubuntu/GenAIExamples/ChatQnA/docker/gaudi/docker_compose.yaml: `version` is obsolete
+WARN[0000] /home/ubuntu/GenAIExamples/ChatQnA/docker/gaudi/compose.yaml: `version` is obsolete
```
## 2. Check the docker container status
@@ -118,7 +118,7 @@ Check the log by `docker logs f7a08f9867f9 -t`.
The log indicates the MODLE_ID is not set.
-View the docker input parameters in `./ChatQnA/docker/gaudi/docker_compose.yaml`
+View the docker input parameters in `./ChatQnA/docker/gaudi/compose.yaml`
```
tgi-service:
@@ -146,10 +146,10 @@ The input MODEL_ID is `${LLM_MODEL_ID}`
Check environment variable `LLM_MODEL_ID` is set correctly, spelled correctly.
Set the LLM_MODEL_ID then restart the containers.
-Also you can check overall logs with the following command, where the docker_compose.yaml is the mega service docker-compose configuration file.
+Also you can check overall logs with the following command, where the compose.yaml is the mega service docker-compose configuration file.
```
-docker compose -f ./docker-composer/gaudi/docker_compose.yaml logs
+docker compose -f ./docker-composer/gaudi/compose.yaml logs
```
## 4. Check each micro service used by the Mega Service
diff --git a/ChatQnA/docker/gpu/README.md b/ChatQnA/docker/gpu/README.md
index 99c088215e..9bcc5b42f4 100644
--- a/ChatQnA/docker/gpu/README.md
+++ b/ChatQnA/docker/gpu/README.md
@@ -78,7 +78,7 @@ Then run the command `docker images`, you will have the following 7 Docker Image
### Setup Environment Variables
-Since the `docker_compose.yaml` will consume some environment variables, you need to setup them in advance as below.
+Since the `compose.yaml` will consume some environment variables, you need to setup them in advance as below.
```bash
export no_proxy=${your_no_proxy}
@@ -110,7 +110,7 @@ Note: Please replace with `host_ip` with you external IP address, do **NOT** use
```bash
cd GenAIExamples/ChatQnA/docker/gpu/
-docker compose -f docker_compose.yaml up -d
+docker compose up -d
```
### Validate MicroServices and MegaService
@@ -245,7 +245,7 @@ curl -X POST "http://${host_ip}:6009/v1/dataprep/delete_file" \
## Enable LangSmith for Monotoring Application (Optional)
-LangSmith offers tools to debug, evaluate, and monitor language models and intelligent agents. It can be used to assess benchmark data for each microservice. Before launching your services with `docker compose -f docker_compose.yaml up -d`, you need to enable LangSmith tracing by setting the `LANGCHAIN_TRACING_V2` environment variable to true and configuring your LangChain API key.
+LangSmith offers tools to debug, evaluate, and monitor language models and intelligent agents. It can be used to assess benchmark data for each microservice. Before launching your services with `docker compose -f compose.yaml up -d`, you need to enable LangSmith tracing by setting the `LANGCHAIN_TRACING_V2` environment variable to true and configuring your LangChain API key.
Here's how you can do it:
@@ -264,7 +264,7 @@ export LANGCHAIN_API_KEY=ls_...
## 🚀 Launch the UI
-To access the frontend, open the following URL in your browser: http://{host_ip}:5173. By default, the UI runs on port 5173 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `docker_compose.yaml` file as shown below:
+To access the frontend, open the following URL in your browser: http://{host_ip}:5173. By default, the UI runs on port 5173 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `compose.yaml` file as shown below:
```yaml
chaqna-ui-server:
diff --git a/ChatQnA/docker/gpu/docker_compose.yaml b/ChatQnA/docker/gpu/compose.yaml
similarity index 100%
rename from ChatQnA/docker/gpu/docker_compose.yaml
rename to ChatQnA/docker/gpu/compose.yaml
diff --git a/ChatQnA/docker/xeon/README.md b/ChatQnA/docker/xeon/README.md
index d17890ccdd..63eef73704 100644
--- a/ChatQnA/docker/xeon/README.md
+++ b/ChatQnA/docker/xeon/README.md
@@ -40,7 +40,7 @@ reranking
=========
Port 8000 - Open to 0.0.0.0/0
-tgi_service or vLLM_service
+tgi-service or vLLM_service
===========
Port 9009 - Open to 0.0.0.0/0
@@ -92,7 +92,7 @@ docker build --no-cache -t opea/reranking-tei:latest --build-arg https_proxy=$ht
docker build --no-cache -t opea/llm-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/text-generation/tgi/Dockerfile .
```
-### Use vLLM as backend
+#### Use vLLM as backend
Build vLLM docker.
@@ -165,7 +165,7 @@ Then run the command `docker images`, you will have the following 7 Docker Image
### Setup Environment Variables
-Since the `docker_compose.yaml` will consume some environment variables, you need to setup them in advance as below.
+Since the `compose.yaml` will consume some environment variables, you need to setup them in advance as below.
**Export the value of the public IP address of your Xeon server to the `host_ip` environment variable**
@@ -228,13 +228,13 @@ cd GenAIExamples/ChatQnA/docker/xeon/
If use TGI backend.
```bash
-docker compose -f docker_compose.yaml up -d
+docker compose -f compose.yaml up -d
```
If use vLLM backend.
```bash
-docker compose -f docker_compose_vllm.yaml up -d
+docker compose -f compose_vllm.yaml up -d
```
### Validate Microservices
@@ -302,7 +302,7 @@ curl http://${host_ip}:9009/generate \
```
```bash
-#vLLM Service
+# vLLM Service
curl http://${your_ip}:9009/v1/completions \
-H "Content-Type: application/json" \
-d '{"model": "Intel/neural-chat-7b-v3-3", "prompt": "What is Deep Learning?", "max_tokens": 32, "temperature": 0}'
@@ -377,7 +377,7 @@ curl -X POST "http://${host_ip}:6009/v1/dataprep/delete_file" \
## Enable LangSmith for Monotoring Application (Optional)
-LangSmith offers tools to debug, evaluate, and monitor language models and intelligent agents. It can be used to assess benchmark data for each microservice. Before launching your services with `docker compose -f docker_compose.yaml up -d`, you need to enable LangSmith tracing by setting the `LANGCHAIN_TRACING_V2` environment variable to true and configuring your LangChain API key.
+LangSmith offers tools to debug, evaluate, and monitor language models and intelligent agents. It can be used to assess benchmark data for each microservice. Before launching your services with `docker compose -f compose.yaml up -d`, you need to enable LangSmith tracing by setting the `LANGCHAIN_TRACING_V2` environment variable to true and configuring your LangChain API key.
Here's how you can do it:
@@ -396,7 +396,7 @@ export LANGCHAIN_API_KEY=ls_...
## 🚀 Launch the UI
-To access the frontend, open the following URL in your browser: http://{host_ip}:5173. By default, the UI runs on port 5173 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `docker_compose.yaml` file as shown below:
+To access the frontend, open the following URL in your browser: http://{host_ip}:5173. By default, the UI runs on port 5173 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `compose.yaml` file as shown below:
```yaml
chaqna-gaudi-ui-server:
@@ -408,7 +408,7 @@ To access the frontend, open the following URL in your browser: http://{host_ip}
## 🚀 Launch the Conversational UI (Optional)
-To access the Conversational UI (react based) frontend, modify the UI service in the `docker_compose.yaml` file. Replace `chaqna-gaudi-ui-server` service with the `chatqna-gaudi-conversation-ui-server` service as per the config below:
+To access the Conversational UI (react based) frontend, modify the UI service in the `compose.yaml` file. Replace `chaqna-gaudi-ui-server` service with the `chatqna-gaudi-conversation-ui-server` service as per the config below:
```yaml
chaqna-gaudi-conversation-ui-server:
@@ -426,7 +426,7 @@ chaqna-gaudi-conversation-ui-server:
restart: always
```
-Once the services are up, open the following URL in your browser: http://{host_ip}:5174. By default, the UI runs on port 80 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `docker_compose.yaml` file as shown below:
+Once the services are up, open the following URL in your browser: http://{host_ip}:5174. By default, the UI runs on port 80 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `compose.yaml` file as shown below:
```yaml
chaqna-gaudi-conversation-ui-server:
diff --git a/ChatQnA/docker/xeon/README_qdrant.md b/ChatQnA/docker/xeon/README_qdrant.md
index 9149695d22..3b5b848f84 100644
--- a/ChatQnA/docker/xeon/README_qdrant.md
+++ b/ChatQnA/docker/xeon/README_qdrant.md
@@ -40,7 +40,7 @@ reranking
=========
Port 8000 - Open to 0.0.0.0/0
-tgi_service
+tgi-service
===========
Port 9009 - Open to 0.0.0.0/0
@@ -147,7 +147,7 @@ Then run the command `docker images`, you will have the following 7 Docker Image
### Setup Environment Variables
-Since the `docker_compose.yaml` will consume some environment variables, you need to setup them in advance as below.
+Since the `compose.yaml` will consume some environment variables, you need to setup them in advance as below.
**Export the value of the public IP address of your Xeon server to the `host_ip` environment variable**
@@ -204,7 +204,7 @@ Note: Please replace with `host_ip` with you external IP address, do not use loc
```bash
cd GenAIExamples/ChatQnA/docker/xeon/
-docker compose -f docker_compose.yaml up -d
+docker compose up -d
```
### Validate Microservices
@@ -341,7 +341,7 @@ curl -X POST "http://${host_ip}:6009/v1/dataprep/delete_file" \
## Enable LangSmith for Monotoring Application (Optional)
-LangSmith offers tools to debug, evaluate, and monitor language models and intelligent agents. It can be used to assess benchmark data for each microservice. Before launching your services with `docker compose -f docker_compose.yaml up -d`, you need to enable LangSmith tracing by setting the `LANGCHAIN_TRACING_V2` environment variable to true and configuring your LangChain API key.
+LangSmith offers tools to debug, evaluate, and monitor language models and intelligent agents. It can be used to assess benchmark data for each microservice. Before launching your services with `docker compose -f compose.yaml up -d`, you need to enable LangSmith tracing by setting the `LANGCHAIN_TRACING_V2` environment variable to true and configuring your LangChain API key.
Here's how you can do it:
@@ -360,7 +360,7 @@ export LANGCHAIN_API_KEY=ls_...
## 🚀 Launch the UI
-To access the frontend, open the following URL in your browser: http://{host_ip}:5173. By default, the UI runs on port 5173 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `docker_compose.yaml` file as shown below:
+To access the frontend, open the following URL in your browser: http://{host_ip}:5173. By default, the UI runs on port 5173 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `compose.yaml` file as shown below:
```yaml
chaqna-gaudi-ui-server:
@@ -372,7 +372,7 @@ To access the frontend, open the following URL in your browser: http://{host_ip}
## 🚀 Launch the Conversational UI (react)
-To access the Conversational UI frontend, open the following URL in your browser: http://{host_ip}:5174. By default, the UI runs on port 80 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `docker_compose.yaml` file as shown below:
+To access the Conversational UI frontend, open the following URL in your browser: http://{host_ip}:5174. By default, the UI runs on port 80 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `compose.yaml` file as shown below:
```yaml
chaqna-xeon-conversation-ui-server:
diff --git a/ChatQnA/docker/xeon/docker_compose.yaml b/ChatQnA/docker/xeon/compose.yaml
similarity index 99%
rename from ChatQnA/docker/xeon/docker_compose.yaml
rename to ChatQnA/docker/xeon/compose.yaml
index fe796ce1a4..a0e05d3dba 100644
--- a/ChatQnA/docker/xeon/docker_compose.yaml
+++ b/ChatQnA/docker/xeon/compose.yaml
@@ -111,7 +111,7 @@ services:
LANGCHAIN_TRACING_V2: ${LANGCHAIN_TRACING_V2}
LANGCHAIN_PROJECT: "opea-reranking-service"
restart: unless-stopped
- tgi_service:
+ tgi-service:
image: ghcr.io/huggingface/text-generation-inference:2.1.0
container_name: tgi-service
ports:
@@ -131,7 +131,7 @@ services:
image: opea/llm-tgi:latest
container_name: llm-tgi-server
depends_on:
- - tgi_service
+ - tgi-service
ports:
- "9000:9000"
ipc: host
@@ -157,7 +157,7 @@ services:
- retriever
- tei-reranking-service
- reranking
- - tgi_service
+ - tgi-service
- llm
ports:
- "8888:8888"
diff --git a/ChatQnA/docker/xeon/docker_compose_qdrant.yaml b/ChatQnA/docker/xeon/docker_compose_qdrant.yaml
index 9a0a0e170c..d915915cab 100644
--- a/ChatQnA/docker/xeon/docker_compose_qdrant.yaml
+++ b/ChatQnA/docker/xeon/docker_compose_qdrant.yaml
@@ -108,7 +108,7 @@ services:
LANGCHAIN_TRACING_V2: ${LANGCHAIN_TRACING_V2}
LANGCHAIN_PROJECT: "opea-reranking-service"
restart: unless-stopped
- tgi_service:
+ tgi-service:
image: ghcr.io/huggingface/text-generation-inference:2.1.0
container_name: tgi-service
ports:
@@ -128,7 +128,7 @@ services:
image: opea/llm-tgi:latest
container_name: llm-tgi-server
depends_on:
- - tgi_service
+ - tgi-service
ports:
- "9000:9000"
ipc: host
@@ -154,7 +154,7 @@ services:
- retriever
- tei-reranking-service
- reranking
- - tgi_service
+ - tgi-service
- llm
ports:
- "8888:8888"
diff --git a/ChatQnA/kubernetes/README.md b/ChatQnA/kubernetes/README.md
index 17d82be99c..bcbca25b6a 100644
--- a/ChatQnA/kubernetes/README.md
+++ b/ChatQnA/kubernetes/README.md
@@ -20,7 +20,7 @@ The ChatQnA uses the below prebuilt images if you choose a Xeon deployment
- retriever: opea/retriever-redis:latest
- tei_xeon_service: ghcr.io/huggingface/text-embeddings-inference:cpu-1.5
- reranking: opea/reranking-tei:latest
-- tgi_service: ghcr.io/huggingface/text-generation-inference:1.4
+- tgi-service: ghcr.io/huggingface/text-generation-inference:1.4
- llm: opea/llm-tgi:latest
- chaqna-xeon-backend-server: opea/chatqna:latest
diff --git a/ChatQnA/tests/test_chatqna_guardrails_on_gaudi.sh b/ChatQnA/tests/test_chatqna_guardrails_on_gaudi.sh
index 5c0238e0bd..70bba9e2c5 100644
--- a/ChatQnA/tests/test_chatqna_guardrails_on_gaudi.sh
+++ b/ChatQnA/tests/test_chatqna_guardrails_on_gaudi.sh
@@ -72,17 +72,17 @@ function start_services() {
if [[ "$IMAGE_REPO" != "" ]]; then
# Replace the container name with a test-specific name
echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
- sed -i "s#image: opea/chatqna-guardrails:latest#image: opea/chatqna:${IMAGE_TAG}#g" docker_compose_guardrails.yaml
- sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" docker_compose_guardrails.yaml
- sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" docker_compose_guardrails.yaml
- sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" docker_compose_guardrails.yaml
- sed -i "s#image: ${IMAGE_REPO}opea/tei-gaudi:latest#image: opea/tei-gaudi:latest#g" docker_compose_guardrails.yaml
- echo "cat docker_compose_guardrails.yaml"
- cat docker_compose_guardrails.yaml
+ sed -i "s#image: opea/chatqna-guardrails:latest#image: opea/chatqna:${IMAGE_TAG}#g" compose_guardrails.yaml
+ sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" compose_guardrails.yaml
+ sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" compose_guardrails.yaml
+ sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose_guardrails.yaml
+ sed -i "s#image: ${IMAGE_REPO}opea/tei-gaudi:latest#image: opea/tei-gaudi:latest#g" compose_guardrails.yaml
+ echo "cat compose_guardrails.yaml"
+ cat compose_guardrails.yaml
fi
# Start Docker Containers
- docker compose -f docker_compose_guardrails.yaml up -d
+ docker compose -f compose_guardrails.yaml up -d
n=0
until [[ "$n" -ge 400 ]]; do
docker logs tgi-gaudi-server > tgi_service_start.log
@@ -240,11 +240,7 @@ function validate_frontend() {
function stop_docker() {
cd $WORKPATH/docker/gaudi
- container_list=$(cat docker_compose_guardrails.yaml | grep container_name | cut -d':' -f2)
- for container_name in $container_list; do
- cid=$(docker ps -aq --filter "name=$container_name")
- if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
- done
+ docker compose -f compose_guardrails.yaml down
}
function main() {
diff --git a/ChatQnA/tests/test_chatqna_on_gaudi.sh b/ChatQnA/tests/test_chatqna_on_gaudi.sh
index dd9b4336f0..63380fbc0b 100644
--- a/ChatQnA/tests/test_chatqna_on_gaudi.sh
+++ b/ChatQnA/tests/test_chatqna_on_gaudi.sh
@@ -68,24 +68,24 @@ function start_services() {
# Replace the container name with a test-specific name
echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
if [ "${mode}" == "perf" ]; then
- sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" docker_compose.yaml
+ sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
else
- sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" docker_compose.yaml
- sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" docker_compose.yaml
- sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" docker_compose.yaml
- sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" docker_compose.yaml
- sed -i "s#image: ${IMAGE_REPO}opea/tei-gaudi:latest#image: opea/tei-gaudi:latest#g" docker_compose.yaml
+ sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" compose.yaml
+ sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" compose.yaml
+ sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" compose.yaml
+ sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
+ sed -i "s#image: ${IMAGE_REPO}opea/tei-gaudi:latest#image: opea/tei-gaudi:latest#g" compose.yaml
fi
- echo "cat docker_compose.yaml"
- cat docker_compose.yaml
+ echo "cat compose.yaml"
+ cat compose.yaml
fi
# Start Docker Containers
- docker compose -f docker_compose.yaml up -d
+ docker compose up -d
n=0
until [[ "$n" -ge 400 ]]; do
- docker logs tgi-gaudi-server > tgi_service_start.log
- if grep -q Connected tgi_service_start.log; then
+ docker logs tgi-gaudi-server > ${LOG_PATH}/tgi_service_start.log
+ if grep -q Connected ${LOG_PATH}/tgi_service_start.log; then
break
fi
sleep 1s
@@ -223,11 +223,7 @@ function validate_frontend() {
function stop_docker() {
cd $WORKPATH/docker/gaudi
- container_list=$(cat docker_compose.yaml | grep container_name | cut -d':' -f2)
- for container_name in $container_list; do
- cid=$(docker ps -aq --filter "name=$container_name")
- if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
- done
+ docker compose stop && docker compose rm -f
}
function main() {
diff --git a/ChatQnA/tests/test_chatqna_on_xeon.sh b/ChatQnA/tests/test_chatqna_on_xeon.sh
index dea7f3d26e..0190646d19 100644
--- a/ChatQnA/tests/test_chatqna_on_xeon.sh
+++ b/ChatQnA/tests/test_chatqna_on_xeon.sh
@@ -55,19 +55,19 @@ function start_services() {
# Replace the container name with a test-specific name
echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
if [ "${mode}" == "perf" ]; then
- sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" docker_compose.yaml
+ sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
else
- sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" docker_compose.yaml
- sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" docker_compose.yaml
- sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" docker_compose.yaml
- sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" docker_compose.yaml
+ sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" compose.yaml
+ sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" compose.yaml
+ sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" compose.yaml
+ sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
fi
- echo "cat docker_compose.yaml"
- cat docker_compose.yaml
+ echo "cat compose.yaml"
+ cat compose.yaml
fi
# Start Docker Containers
- docker compose -f docker_compose.yaml up -d
+ docker compose up -d
n=0
until [[ "$n" -ge 500 ]]; do
docker logs tgi-service > ${LOG_PATH}/tgi_service_start.log
@@ -209,11 +209,7 @@ function validate_frontend() {
function stop_docker() {
cd $WORKPATH/docker/xeon
- container_list=$(cat docker_compose.yaml | grep container_name | cut -d':' -f2)
- for container_name in $container_list; do
- cid=$(docker ps -aq --filter "name=$container_name")
- if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
- done
+ docker compose stop && docker compose rm -f
}
function main() {
diff --git a/ChatQnA/tests/test_chatqna_qdrant_on_xeon.sh b/ChatQnA/tests/test_chatqna_qdrant_on_xeon.sh
index 54c946321f..977e287496 100644
--- a/ChatQnA/tests/test_chatqna_qdrant_on_xeon.sh
+++ b/ChatQnA/tests/test_chatqna_qdrant_on_xeon.sh
@@ -55,14 +55,14 @@ function start_services() {
if [[ "$IMAGE_REPO" != "" ]]; then
# Replace the container name with a test-specific name
echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
- sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" docker_compose.yaml
- sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" docker_compose.yaml
- sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" docker_compose.yaml
- sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" docker_compose.yaml
+ sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" compose.yaml
+ sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" compose.yaml
+ sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" compose.yaml
+ sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
fi
# Start Docker Containers
- docker compose -f docker_compose.yaml up -d
+ docker compose up -d
n=0
until [[ "$n" -ge 200 ]]; do
docker logs tgi-service > tgi_service_start.log
@@ -204,11 +204,7 @@ function validate_frontend() {
function stop_docker() {
cd $WORKPATH/docker/xeon
- container_list=$(cat docker_compose.yaml | grep container_name | cut -d':' -f2)
- for container_name in $container_list; do
- cid=$(docker ps -aq --filter "name=$container_name")
- if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
- done
+ docker compose stop && docker compose rm -f
}
function main() {
diff --git a/ChatQnA/tests/test_chatqna_ray_on_gaudi.sh b/ChatQnA/tests/test_chatqna_ray_on_gaudi.sh
index 2dd24edccf..30c03c77a1 100644
--- a/ChatQnA/tests/test_chatqna_ray_on_gaudi.sh
+++ b/ChatQnA/tests/test_chatqna_ray_on_gaudi.sh
@@ -68,17 +68,17 @@ function start_services() {
if [[ "$IMAGE_REPO" != "" ]]; then
# Replace the container name with a test-specific name
echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
- sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" docker_compose_ray_serve.yaml
- sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" docker_compose_ray_serve.yaml
- sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" docker_compose_ray_serve.yaml
- sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" docker_compose_ray_serve.yaml
- sed -i "s#image: ${IMAGE_REPO}opea/tei-gaudi:latest#image: opea/tei-gaudi:latest#g" docker_compose_ray_serve.yaml
- echo "cat docker_compose_ray_serve.yaml"
- cat docker_compose_ray_serve.yaml
+ sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" compose_ray_serve.yaml
+ sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" compose_ray_serve.yaml
+ sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" compose_ray_serve.yaml
+ sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose_ray_serve.yaml
+ sed -i "s#image: ${IMAGE_REPO}opea/tei-gaudi:latest#image: opea/tei-gaudi:latest#g" compose_ray_serve.yaml
+ echo "cat compose_ray_serve.yaml"
+ cat compose_ray_serve.yaml
fi
# Start Docker Containers
- docker compose -f docker_compose_ray_serve.yaml up -d
+ docker compose -f compose_ray_serve.yaml up -d
n=0
until [[ "$n" -ge 180 ]]; do
docker logs ray-gaudi-server > ray_service_start.log
@@ -220,11 +220,7 @@ function validate_frontend() {
function stop_docker() {
cd $WORKPATH/docker/gaudi
- container_list=$(cat docker_compose_ray_serve.yaml | grep container_name | cut -d':' -f2)
- for container_name in $container_list; do
- cid=$(docker ps -aq --filter "name=$container_name")
- if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
- done
+ docker compose -f compose_ray_serve.yaml down
}
function main() {
diff --git a/ChatQnA/tests/test_chatqna_vllm_on_gaudi.sh b/ChatQnA/tests/test_chatqna_vllm_on_gaudi.sh
index 2cf99bd28e..87953dfdef 100644
--- a/ChatQnA/tests/test_chatqna_vllm_on_gaudi.sh
+++ b/ChatQnA/tests/test_chatqna_vllm_on_gaudi.sh
@@ -67,17 +67,17 @@ function start_services() {
if [[ "$IMAGE_REPO" != "" ]]; then
# Replace the container name with a test-specific name
echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
- sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" docker_compose_vllm.yaml
- sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" docker_compose_vllm.yaml
- sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" docker_compose_vllm.yaml
- sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" docker_compose_vllm.yaml
- sed -i "s#image: ${IMAGE_REPO}opea/tei-gaudi:latest#image: opea/tei-gaudi:latest#g" docker_compose_vllm.yaml
- echo "cat docker_compose_vllm.yaml"
- cat docker_compose_vllm.yaml
+ sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" compose_vllm.yaml
+ sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" compose_vllm.yaml
+ sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" compose_vllm.yaml
+ sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose_vllm.yaml
+ sed -i "s#image: ${IMAGE_REPO}opea/tei-gaudi:latest#image: opea/tei-gaudi:latest#g" compose_vllm.yaml
+ echo "cat compose_vllm.yaml"
+ cat compose_vllm.yaml
fi
# Start Docker Containers
- docker compose -f docker_compose_vllm.yaml up -d
+ docker compose -f compose_vllm.yaml up -d
n=0
until [[ "$n" -ge 180 ]]; do
docker logs vllm-gaudi-server > vllm_service_start.log
@@ -219,11 +219,7 @@ function validate_frontend() {
function stop_docker() {
cd $WORKPATH/docker/gaudi
- container_list=$(cat docker_compose_vllm.yaml | grep container_name | cut -d':' -f2)
- for container_name in $container_list; do
- cid=$(docker ps -aq --filter "name=$container_name")
- if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
- done
+ docker compose -f compose_vllm.yaml down
}
function main() {
diff --git a/ChatQnA/tests/test_chatqna_vllm_on_xeon.sh b/ChatQnA/tests/test_chatqna_vllm_on_xeon.sh
index 98b82ec98b..6ea823f72a 100644
--- a/ChatQnA/tests/test_chatqna_vllm_on_xeon.sh
+++ b/ChatQnA/tests/test_chatqna_vllm_on_xeon.sh
@@ -61,17 +61,17 @@ function start_services() {
# Replace the container name with a test-specific name
echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
if [ "${mode}" == "perf" ]; then
- sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" docker_compose_vllm.yaml
+ sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose_vllm.yaml
else
- sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" docker_compose_vllm.yaml
- sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" docker_compose_vllm.yaml
- sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" docker_compose_vllm.yaml
- sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" docker_compose_vllm.yaml
+ sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" compose_vllm.yaml
+ sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" compose_vllm.yaml
+ sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" compose_vllm.yaml
+ sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose_vllm.yaml
fi
fi
# Start Docker Containers
- docker compose -f docker_compose_vllm.yaml up -d
+ docker compose -f compose_vllm.yaml up -d
n=0
until [[ "$n" -ge 100 ]]; do
docker logs vllm-service > ${LOG_PATH}/vllm_service_start.log
@@ -213,11 +213,7 @@ function validate_frontend() {
function stop_docker() {
cd $WORKPATH/docker/xeon
- container_list=$(cat docker_compose_vllm.yaml | grep container_name | cut -d':' -f2)
- for container_name in $container_list; do
- cid=$(docker ps -aq --filter "name=$container_name")
- if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
- done
+ docker compose -f compose_vllm.yaml down
}
function main() {
diff --git a/ChatQnA/tests/test_chatqna_vllm_ray_on_gaudi.sh b/ChatQnA/tests/test_chatqna_vllm_ray_on_gaudi.sh
index 9e8e8110e6..6d94252e58 100644
--- a/ChatQnA/tests/test_chatqna_vllm_ray_on_gaudi.sh
+++ b/ChatQnA/tests/test_chatqna_vllm_ray_on_gaudi.sh
@@ -68,17 +68,17 @@ function start_services() {
if [[ "$IMAGE_REPO" != "" ]]; then
# Replace the container name with a test-specific name
echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
- sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" docker_compose_vllm_ray.yaml
- sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" docker_compose_vllm_ray.yaml
- sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" docker_compose_vllm_ray.yaml
- sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" docker_compose_vllm_ray.yaml
- sed -i "s#image: ${IMAGE_REPO}opea/tei-gaudi:latest#image: opea/tei-gaudi:latest#g" docker_compose_vllm_ray.yaml
- echo "cat docker_compose_vllm_ray.yaml"
- cat docker_compose_vllm_ray.yaml
+ sed -i "s#image: opea/chatqna:latest#image: opea/chatqna:${IMAGE_TAG}#g" compose_vllm_ray.yaml
+ sed -i "s#image: opea/chatqna-ui:latest#image: opea/chatqna-ui:${IMAGE_TAG}#g" compose_vllm_ray.yaml
+ sed -i "s#image: opea/chatqna-conversation-ui:latest#image: opea/chatqna-conversation-ui:${IMAGE_TAG}#g" compose_vllm_ray.yaml
+ sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose_vllm_ray.yaml
+ sed -i "s#image: ${IMAGE_REPO}opea/tei-gaudi:latest#image: opea/tei-gaudi:latest#g" compose_vllm_ray.yaml
+ echo "cat compose_vllm_ray.yaml"
+ cat compose_vllm_ray.yaml
fi
# Start Docker Containers
- docker compose -f docker_compose_vllm_ray.yaml up -d
+ docker compose -f compose_vllm_ray.yaml up -d
n=0
until [[ "$n" -ge 400 ]]; do
docker logs vllm-ray-gaudi-server > vllm_ray_service_start.log
@@ -220,11 +220,7 @@ function validate_frontend() {
function stop_docker() {
cd $WORKPATH/docker/gaudi
- container_list=$(cat docker_compose_vllm_ray.yaml | grep container_name | cut -d':' -f2)
- for container_name in $container_list; do
- cid=$(docker ps -aq --filter "name=$container_name")
- if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
- done
+ docker compose -f compose_vllm_ray.yaml down
}
function main() {
diff --git a/CodeGen/README.md b/CodeGen/README.md
index 451c35017a..ad981debd9 100644
--- a/CodeGen/README.md
+++ b/CodeGen/README.md
@@ -63,11 +63,11 @@ source ./docker/set_env.sh
### Deploy CodeGen on Gaudi
-Please find corresponding [docker_compose.yaml](./docker/gaudi/docker_compose.yaml).
+Please find corresponding [compose.yaml](./docker/gaudi/compose.yaml).
```bash
cd GenAIExamples/CodeGen/docker/gaudi
-docker compose -f docker_compose.yaml up -d
+docker compose up -d
```
> Notice: Currently only the Habana Driver 1.16.x is supported for Gaudi.
@@ -76,11 +76,11 @@ Please refer to the [Gaudi Guide](./docker/gaudi/README.md) to build docker imag
### Deploy CodeGen on Xeon
-Please find corresponding [docker_compose.yaml](./docker/xeon/docker_compose.yaml).
+Please find corresponding [compose.yaml](./docker/xeon/compose.yaml).
```bash
cd GenAIExamples/CodeGen/docker/xeon
-docker compose -f docker_compose.yaml up -d
+docker compose up -d
```
Refer to the [Xeon Guide](./docker/xeon/README.md) for more instructions on building docker images from source.
@@ -125,6 +125,6 @@ curl http://${host_ip}:8028/generate \
-H 'Content-Type: application/json'
```
-2. (Docker only) If all microservices work well, please check the port ${host_ip}:7778, the port may be allocated by other users, you can modify the `docker_compose.yaml`.
+2. (Docker only) If all microservices work well, please check the port ${host_ip}:7778, the port may be allocated by other users, you can modify the `compose.yaml`.
-3. (Docker only) If you get errors like "The container name is in use", please change container name in `docker_compose.yaml`.
+3. (Docker only) If you get errors like "The container name is in use", please change container name in `compose.yaml`.
diff --git a/CodeGen/codegen.yaml b/CodeGen/codegen.yaml
index 9d740d28a7..7e4f423c33 100644
--- a/CodeGen/codegen.yaml
+++ b/CodeGen/codegen.yaml
@@ -3,7 +3,7 @@
# SPDX-License-Identifier: Apache-2.0
opea_micro_services:
- tgi_service:
+ tgi-service:
host: ${TGI_SERVICE_IP}
ports: ${TGI_SERVICE_PORT}
image: ghcr.io/huggingface/tgi-gaudi:2.0.1
diff --git a/CodeGen/docker/gaudi/README.md b/CodeGen/docker/gaudi/README.md
index 614e73751c..7a236d17ef 100644
--- a/CodeGen/docker/gaudi/README.md
+++ b/CodeGen/docker/gaudi/README.md
@@ -82,7 +82,7 @@ flowchart LR
### Setup Environment Variables
-Since the `docker_compose.yaml` will consume some environment variables, you need to setup them in advance as below.
+Since the `compose.yaml` will consume some environment variables, you need to setup them in advance as below.
```bash
export no_proxy=${your_no_proxy}
@@ -103,7 +103,7 @@ export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:7778/v1/codegen"
```bash
cd GenAIExamples/CodeGen/docker/gaudi
-docker compose -f docker_compose.yaml up -d
+docker compose up -d
```
### Validate the MicroServices and MegaService
@@ -136,7 +136,7 @@ curl http://${host_ip}:7778/v1/codegen -H "Content-Type: application/json" -d '{
## Enable LangSmith to Monitor Application (Optional)
-LangSmith offers tools to debug, evaluate, and monitor language models and intelligent agents. It can be used to assess benchmark data for each microservice. Before launching your services with `docker compose -f docker_compose.yaml up -d`, you need to enable LangSmith tracing by setting the `LANGCHAIN_TRACING_V2` environment variable to true and configuring your LangChain API key.
+LangSmith offers tools to debug, evaluate, and monitor language models and intelligent agents. It can be used to assess benchmark data for each microservice. Before launching your services with `docker compose -f compose.yaml up -d`, you need to enable LangSmith tracing by setting the `LANGCHAIN_TRACING_V2` environment variable to true and configuring your LangChain API key.
Here's how you can do it:
@@ -155,7 +155,7 @@ export LANGCHAIN_API_KEY=ls_...
## 🚀 Launch the Svelte Based UI
-To access the frontend, open the following URL in your browser: `http://{host_ip}:5173`. By default, the UI runs on port 5173 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `docker_compose.yaml` file as shown below:
+To access the frontend, open the following URL in your browser: `http://{host_ip}:5173`. By default, the UI runs on port 5173 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `compose.yaml` file as shown below:
```yaml
codegen-gaudi-ui-server:
@@ -169,7 +169,7 @@ To access the frontend, open the following URL in your browser: `http://{host_ip
## 🚀 Launch the React Based UI
-To access the frontend, open the following URL in your browser: `http://{host_ip}:5174`. By default, the UI runs on port 5174 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `docker_compose.yaml` file as shown below:
+To access the frontend, open the following URL in your browser: `http://{host_ip}:5174`. By default, the UI runs on port 5174 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `compose.yaml` file as shown below:
```yaml
codegen-gaudi-react-ui-server:
diff --git a/CodeGen/docker/gaudi/docker_compose.yaml b/CodeGen/docker/gaudi/compose.yaml
similarity index 98%
rename from CodeGen/docker/gaudi/docker_compose.yaml
rename to CodeGen/docker/gaudi/compose.yaml
index 965bbea974..bdf4307590 100644
--- a/CodeGen/docker/gaudi/docker_compose.yaml
+++ b/CodeGen/docker/gaudi/compose.yaml
@@ -5,7 +5,7 @@
version: "3.8"
services:
- tgi_service:
+ tgi-service:
image: ghcr.io/huggingface/tgi-gaudi:2.0.1
container_name: tgi-gaudi-server
ports:
@@ -28,7 +28,7 @@ services:
image: opea/llm-tgi:latest
container_name: llm-tgi-gaudi-server
depends_on:
- - tgi_service
+ - tgi-service
ports:
- "9000:9000"
ipc: host
diff --git a/CodeGen/docker/xeon/README.md b/CodeGen/docker/xeon/README.md
index 75aeaafbbc..4a8ae4ed4b 100644
--- a/CodeGen/docker/xeon/README.md
+++ b/CodeGen/docker/xeon/README.md
@@ -80,7 +80,7 @@ flowchart LR
### Setup Environment Variables
-Since the `docker_compose.yaml` will consume some environment variables, you need to setup them in advance as below.
+Since the `compose.yaml` will consume some environment variables, you need to setup them in advance as below.
**Append the value of the public IP address to the no_proxy list**
@@ -106,7 +106,7 @@ Note: Please replace the `host_ip` with you external IP address, do not use `loc
```bash
cd GenAIExamples/CodeGen/docker/xeon
-docker compose -f docker_compose.yaml up -d
+docker compose up -d
```
### Validate the MicroServices and MegaService
@@ -139,7 +139,7 @@ curl http://${host_ip}:7778/v1/codegen -H "Content-Type: application/json" -d '{
## Enable LangSmith for Monitoring Application (Optional)
-LangSmith offers tools to debug, evaluate, and monitor language models and intelligent agents. It can be used to assess benchmark data for each microservice. Before launching your services with `docker compose -f docker_compose.yaml up -d`, you need to enable LangSmith tracing by setting the `LANGCHAIN_TRACING_V2` environment variable to true and configuring your LangChain API key.
+LangSmith offers tools to debug, evaluate, and monitor language models and intelligent agents. It can be used to assess benchmark data for each microservice. Before launching your services with `docker compose -f compose.yaml up -d`, you need to enable LangSmith tracing by setting the `LANGCHAIN_TRACING_V2` environment variable to true and configuring your LangChain API key.
Here's how you can do it:
@@ -158,7 +158,7 @@ export LANGCHAIN_API_KEY=ls_...
## 🚀 Launch the UI
-To access the frontend, open the following URL in your browser: `http://{host_ip}:5173`. By default, the UI runs on port 5173 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `docker_compose.yaml` file as shown below:
+To access the frontend, open the following URL in your browser: `http://{host_ip}:5173`. By default, the UI runs on port 5173 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `compose.yaml` file as shown below:
```yaml
codegen-xeon-ui-server:
@@ -176,7 +176,7 @@ Here is an example of running CodeGen in the UI:
## 🚀 Launch the React Based UI
-To access the frontend, open the following URL in your browser: `http://{host_ip}:5174`. By default, the UI runs on port 5174 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `docker_compose.yaml` file as shown below:
+To access the frontend, open the following URL in your browser: `http://{host_ip}:5174`. By default, the UI runs on port 5174 internally. If you prefer to use a different host port to access the frontend, you can modify the port mapping in the `compose.yaml` file as shown below:
```yaml
codegen-xeon-react-ui-server:
diff --git a/CodeGen/docker/xeon/docker_compose.yaml b/CodeGen/docker/xeon/compose.yaml
similarity index 98%
rename from CodeGen/docker/xeon/docker_compose.yaml
rename to CodeGen/docker/xeon/compose.yaml
index c6c373c927..eca9a66cd1 100644
--- a/CodeGen/docker/xeon/docker_compose.yaml
+++ b/CodeGen/docker/xeon/compose.yaml
@@ -5,7 +5,7 @@
version: "3.8"
services:
- tgi_service:
+ tgi-service:
image: ghcr.io/huggingface/text-generation-inference:1.4
container_name: tgi-service
ports:
@@ -23,7 +23,7 @@ services:
image: opea/llm-tgi:latest
container_name: llm-tgi-server
depends_on:
- - tgi_service
+ - tgi-service
ports:
- "9000:9000"
ipc: host
diff --git a/CodeGen/tests/test_codegen_on_gaudi.sh b/CodeGen/tests/test_codegen_on_gaudi.sh
index 2f597538c5..dd2005a712 100644
--- a/CodeGen/tests/test_codegen_on_gaudi.sh
+++ b/CodeGen/tests/test_codegen_on_gaudi.sh
@@ -42,18 +42,26 @@ function start_services() {
if [[ "$IMAGE_REPO" != "" ]]; then
# Replace the container name with a test-specific name
echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
- sed -i "s#image: opea/codegen:latest#image: opea/codegen:${IMAGE_TAG}#g" docker_compose.yaml
- sed -i "s#image: opea/codegen-ui:latest#image: opea/codegen-ui:${IMAGE_TAG}#g" docker_compose.yaml
- sed -i "s#image: opea/codegen-react-ui:latest#image: opea/codegen-react-ui:${IMAGE_TAG}#g" docker_compose.yaml
- sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" docker_compose.yaml
- echo "cat docker_compose.yaml"
- cat docker_compose.yaml
+ sed -i "s#image: opea/codegen:latest#image: opea/codegen:${IMAGE_TAG}#g" compose.yaml
+ sed -i "s#image: opea/codegen-ui:latest#image: opea/codegen-ui:${IMAGE_TAG}#g" compose.yaml
+ sed -i "s#image: opea/codegen-react-ui:latest#image: opea/codegen-react-ui:${IMAGE_TAG}#g" compose.yaml
+ sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
+ echo "cat compose.yaml"
+ cat compose.yaml
fi
# Start Docker Containers
- docker compose -f docker_compose.yaml up -d
+ docker compose up -d
- sleep 5m # Waits 5 minutes
+ n=0
+ until [[ "$n" -ge 400 ]]; do
+ docker logs tgi-gaudi-server > ${LOG_PATH}/tgi_service_start.log
+ if grep -q Connected ${LOG_PATH}/tgi_service_start.log; then
+ break
+ fi
+ sleep 1s
+ n=$((n+1))
+ done
}
function validate_services() {
@@ -141,11 +149,7 @@ function validate_frontend() {
function stop_docker() {
cd $WORKPATH/docker/gaudi
- container_list=$(cat docker_compose.yaml | grep container_name | cut -d':' -f2)
- for container_name in $container_list; do
- cid=$(docker ps -aq --filter "name=$container_name")
- if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
- done
+ docker compose stop && docker compose rm -f
}
function main() {
diff --git a/CodeGen/tests/test_codegen_on_xeon.sh b/CodeGen/tests/test_codegen_on_xeon.sh
index c6b4e263da..987fb8b813 100644
--- a/CodeGen/tests/test_codegen_on_xeon.sh
+++ b/CodeGen/tests/test_codegen_on_xeon.sh
@@ -42,18 +42,26 @@ function start_services() {
if [[ "$IMAGE_REPO" != "" ]]; then
# Replace the container name with a test-specific name
echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
- sed -i "s#image: opea/codegen:latest#image: opea/codegen:${IMAGE_TAG}#g" docker_compose.yaml
- sed -i "s#image: opea/codegen-ui:latest#image: opea/codegen-ui:${IMAGE_TAG}#g" docker_compose.yaml
- sed -i "s#image: opea/codegen-react-ui:latest#image: opea/codegen-react-ui:${IMAGE_TAG}#g" docker_compose.yaml
- sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" docker_compose.yaml
- echo "cat docker_compose.yaml"
- cat docker_compose.yaml
+ sed -i "s#image: opea/codegen:latest#image: opea/codegen:${IMAGE_TAG}#g" compose.yaml
+ sed -i "s#image: opea/codegen-ui:latest#image: opea/codegen-ui:${IMAGE_TAG}#g" compose.yaml
+ sed -i "s#image: opea/codegen-react-ui:latest#image: opea/codegen-react-ui:${IMAGE_TAG}#g" compose.yaml
+ sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
+ echo "cat compose.yaml"
+ cat compose.yaml
fi
# Start Docker Containers
- docker compose -f docker_compose.yaml up -d
+ docker compose up -d
- sleep 2m # Waits 2 minutes
+ n=0
+ until [[ "$n" -ge 500 ]]; do
+ docker logs tgi-service > ${LOG_PATH}/tgi_service_start.log
+ if grep -q Connected ${LOG_PATH}/tgi_service_start.log; then
+ break
+ fi
+ sleep 1s
+ n=$((n+1))
+ done
}
function validate_services() {
@@ -142,11 +150,7 @@ function validate_frontend() {
function stop_docker() {
cd $WORKPATH/docker/xeon
- container_list=$(cat docker_compose.yaml | grep container_name | cut -d':' -f2)
- for container_name in $container_list; do
- cid=$(docker ps -aq --filter "name=$container_name")
- if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
- done
+ docker compose stop && docker compose rm -f
}
function main() {
diff --git a/CodeTrans/README.md b/CodeTrans/README.md
index 886baa0fab..7cb6ba914e 100644
--- a/CodeTrans/README.md
+++ b/CodeTrans/README.md
@@ -53,11 +53,11 @@ source ./docker/set_env.sh
### Deploy Code Translation on Gaudi
-Please find corresponding [docker_compose.yaml](./docker/gaudi/docker_compose.yaml).
+Please find corresponding [compose.yaml](./docker/gaudi/compose.yaml).
```bash
cd GenAIExamples/CodeTrans/docker/gaudi
-docker compose -f docker_compose.yaml up -d
+docker compose up -d
```
> Notice: Currently only the Habana Driver 1.16.x is supported for Gaudi.
@@ -66,11 +66,11 @@ Please refer to the [Gaudi Guide](./docker/gaudi/README.md) to build docker imag
### Deploy Code Translation on Xeon
-Please find corresponding [docker_compose.yaml](./docker/xeon/docker_compose.yaml).
+Please find corresponding [compose.yaml](./docker/xeon/compose.yaml).
```bash
cd GenAIExamples/CodeTrans/docker/xeon
-docker compose -f docker_compose.yaml up -d
+docker compose up -d
```
Refer to the [Xeon Guide](./docker/xeon/README.md) for more instructions on building docker images from source.
@@ -119,6 +119,6 @@ curl http://${host_ip}:8008/generate \
-H 'Content-Type: application/json'
```
-2. (Docker only) If all microservices work well, please check the port ${host_ip}:7777, the port may be allocated by other users, you can modify the `docker_compose.yaml`.
+2. (Docker only) If all microservices work well, please check the port ${host_ip}:7777, the port may be allocated by other users, you can modify the `compose.yaml`.
-3. (Docker only) If you get errors like "The container name is in use", please change container name in `docker_compose.yaml`.
+3. (Docker only) If you get errors like "The container name is in use", please change container name in `compose.yaml`.
diff --git a/CodeTrans/codetrans.yaml b/CodeTrans/codetrans.yaml
index 7298e9cdd4..a16c5a484c 100644
--- a/CodeTrans/codetrans.yaml
+++ b/CodeTrans/codetrans.yaml
@@ -3,7 +3,7 @@
# SPDX-License-Identifier: Apache-2.0
opea_micro_services:
- tgi_service:
+ tgi-service:
host: ${TGI_SERVICE_IP}
ports: ${TGI_SERVICE_PORT}
image: ghcr.io/huggingface/tgi-gaudi:2.0.1
diff --git a/CodeTrans/docker/gaudi/README.md b/CodeTrans/docker/gaudi/README.md
index 87cd9f3ea1..64458cb56a 100755
--- a/CodeTrans/docker/gaudi/README.md
+++ b/CodeTrans/docker/gaudi/README.md
@@ -44,7 +44,7 @@ Then run the command `docker images`, you will have the following Docker Images:
### Setup Environment Variables
-Since the `docker_compose.yaml` will consume some environment variables, you need to setup them in advance as below. Notice that the `LLM_MODEL_ID` indicates the LLM model used for TGI service.
+Since the `compose.yaml` will consume some environment variables, you need to setup them in advance as below. Notice that the `LLM_MODEL_ID` indicates the LLM model used for TGI service.
```bash
export no_proxy=${your_no_proxy}
@@ -62,7 +62,7 @@ export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:7777/v1/codetrans"
```bash
cd GenAIExamples/CodeTrans/docker/gaudi
-docker compose -f docker_compose.yaml up -d
+docker compose up -d
```
### Validate Microservices
@@ -95,7 +95,7 @@ curl http://${host_ip}:7777/v1/codetrans \
## Enable LangSmith to Monitor an Application (Optional)
-LangSmith offers tools to debug, evaluate, and monitor language models and intelligent agents. It can be used to assess benchmark data for each microservice. Before launching your services with `docker compose -f docker_compose.yaml up -d`, you need to enable LangSmith tracing by setting the `LANGCHAIN_TRACING_V2` environment variable to true and configuring your LangChain API key.
+LangSmith offers tools to debug, evaluate, and monitor language models and intelligent agents. It can be used to assess benchmark data for each microservice. Before launching your services with `docker compose -f compose.yaml up -d`, you need to enable LangSmith tracing by setting the `LANGCHAIN_TRACING_V2` environment variable to true and configuring your LangChain API key.
Here's how you can do it:
diff --git a/CodeTrans/docker/gaudi/docker_compose.yaml b/CodeTrans/docker/gaudi/compose.yaml
similarity index 98%
rename from CodeTrans/docker/gaudi/docker_compose.yaml
rename to CodeTrans/docker/gaudi/compose.yaml
index 6ee4772b09..dd7a60d9f3 100644
--- a/CodeTrans/docker/gaudi/docker_compose.yaml
+++ b/CodeTrans/docker/gaudi/compose.yaml
@@ -5,7 +5,7 @@
version: "3.8"
services:
- tgi_service:
+ tgi-service:
image: ghcr.io/huggingface/tgi-gaudi:2.0.1
container_name: codetrans-tgi-service
ports:
@@ -44,7 +44,7 @@ services:
image: opea/codetrans:latest
container_name: codetrans-gaudi-backend-server
depends_on:
- - tgi_service
+ - tgi-service
- llm
ports:
- "7777:7777"
diff --git a/CodeTrans/docker/xeon/README.md b/CodeTrans/docker/xeon/README.md
index ac13ea71f2..88dcf051b6 100755
--- a/CodeTrans/docker/xeon/README.md
+++ b/CodeTrans/docker/xeon/README.md
@@ -52,7 +52,7 @@ Then run the command `docker images`, you will have the following Docker Images:
### Setup Environment Variables
-Since the `docker_compose.yaml` will consume some environment variables, you need to setup them in advance as below. Notice that the `LLM_MODEL_ID` indicates the LLM model used for TGI service.
+Since the `compose.yaml` will consume some environment variables, you need to setup them in advance as below. Notice that the `LLM_MODEL_ID` indicates the LLM model used for TGI service.
```bash
export no_proxy=${your_no_proxy}
@@ -70,7 +70,7 @@ export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:7777/v1/codetrans"
```bash
cd GenAIExamples/CodeTrans/docker/xeon
-docker compose -f docker_compose.yaml up -d
+docker compose up -d
```
### Validate Microservices
@@ -103,7 +103,7 @@ curl http://${host_ip}:7777/v1/codetrans \
## Enable LangSmith to Monitor an Application (Optional)
-LangSmith offers tools to debug, evaluate, and monitor language models and intelligent agents. It can be used to assess benchmark data for each microservice. Before launching your services with `docker compose -f docker_compose.yaml up -d`, you need to enable LangSmith tracing by setting the `LANGCHAIN_TRACING_V2` environment variable to true and configuring your LangChain API key.
+LangSmith offers tools to debug, evaluate, and monitor language models and intelligent agents. It can be used to assess benchmark data for each microservice. Before launching your services with `docker compose -f compose.yaml up -d`, you need to enable LangSmith tracing by setting the `LANGCHAIN_TRACING_V2` environment variable to true and configuring your LangChain API key.
Here's how you can do it:
diff --git a/CodeTrans/docker/xeon/docker_compose.yaml b/CodeTrans/docker/xeon/compose.yaml
similarity index 98%
rename from CodeTrans/docker/xeon/docker_compose.yaml
rename to CodeTrans/docker/xeon/compose.yaml
index f5f5a2dca5..5e9da88235 100644
--- a/CodeTrans/docker/xeon/docker_compose.yaml
+++ b/CodeTrans/docker/xeon/compose.yaml
@@ -5,7 +5,7 @@
version: "3.8"
services:
- tgi_service:
+ tgi-service:
image: ghcr.io/huggingface/text-generation-inference:1.4
container_name: codetrans-tgi-service
ports:
@@ -39,7 +39,7 @@ services:
image: opea/codetrans:latest
container_name: codetrans-xeon-backend-server
depends_on:
- - tgi_service
+ - tgi-service
- llm
ports:
- "7777:7777"
diff --git a/CodeTrans/tests/test_codetrans_on_gaudi.sh b/CodeTrans/tests/test_codetrans_on_gaudi.sh
index 68dd4e1a5b..c3b22f5237 100644
--- a/CodeTrans/tests/test_codetrans_on_gaudi.sh
+++ b/CodeTrans/tests/test_codetrans_on_gaudi.sh
@@ -43,17 +43,25 @@ function start_services() {
if [[ "$IMAGE_REPO" != "" ]]; then
# Replace the container name with a test-specific name
echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
- sed -i "s#image: opea/codetrans:latest#image: opea/codetrans:${IMAGE_TAG}#g" docker_compose.yaml
- sed -i "s#image: opea/codetrans-ui:latest#image: opea/codetrans-ui:${IMAGE_TAG}#g" docker_compose.yaml
- sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" docker_compose.yaml
- echo "cat docker_compose.yaml"
- cat docker_compose.yaml
+ sed -i "s#image: opea/codetrans:latest#image: opea/codetrans:${IMAGE_TAG}#g" compose.yaml
+ sed -i "s#image: opea/codetrans-ui:latest#image: opea/codetrans-ui:${IMAGE_TAG}#g" compose.yaml
+ sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
+ echo "cat compose.yaml"
+ cat compose.yaml
fi
# Start Docker Containers
- docker compose -f docker_compose.yaml up -d
+ docker compose up -d
- sleep 2m # Waits 2 minutes
+ n=0
+ until [[ "$n" -ge 400 ]]; do
+ docker logs codetrans-tgi-service > ${LOG_PATH}/tgi_service_start.log
+ if grep -q Connected ${LOG_PATH}/tgi_service_start.log; then
+ break
+ fi
+ sleep 1s
+ n=$((n+1))
+ done
}
function validate_services() {
@@ -140,11 +148,7 @@ function validate_frontend() {
function stop_docker() {
cd $WORKPATH/docker/gaudi
- container_list=$(cat docker_compose.yaml | grep container_name | cut -d':' -f2)
- for container_name in $container_list; do
- cid=$(docker ps -aq --filter "name=$container_name")
- if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
- done
+ docker compose stop && docker compose rm -f
}
function main() {
diff --git a/CodeTrans/tests/test_codetrans_on_xeon.sh b/CodeTrans/tests/test_codetrans_on_xeon.sh
index ff7bac2ff4..fdb134edfe 100644
--- a/CodeTrans/tests/test_codetrans_on_xeon.sh
+++ b/CodeTrans/tests/test_codetrans_on_xeon.sh
@@ -40,17 +40,25 @@ function start_services() {
if [[ "$IMAGE_REPO" != "" ]]; then
# Replace the container name with a test-specific name
echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
- sed -i "s#image: opea/codetrans:latest#image: opea/codetrans:${IMAGE_TAG}#g" docker_compose.yaml
- sed -i "s#image: opea/codetrans-ui:latest#image: opea/codetrans-ui:${IMAGE_TAG}#g" docker_compose.yaml
- sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" docker_compose.yaml
- echo "cat docker_compose.yaml"
- cat docker_compose.yaml
+ sed -i "s#image: opea/codetrans:latest#image: opea/codetrans:${IMAGE_TAG}#g" compose.yaml
+ sed -i "s#image: opea/codetrans-ui:latest#image: opea/codetrans-ui:${IMAGE_TAG}#g" compose.yaml
+ sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
+ echo "cat compose.yaml"
+ cat compose.yaml
fi
# Start Docker Containers
- docker compose -f docker_compose.yaml up -d
+ docker compose up -d
- sleep 2m
+ n=0
+ until [[ "$n" -ge 400 ]]; do
+ docker logs codetrans-tgi-service > ${LOG_PATH}/tgi_service_start.log
+ if grep -q Connected ${LOG_PATH}/tgi_service_start.log; then
+ break
+ fi
+ sleep 1s
+ n=$((n+1))
+ done
}
function validate_services() {
@@ -138,11 +146,7 @@ function validate_frontend() {
function stop_docker() {
cd $WORKPATH/docker/xeon
- container_list=$(cat docker_compose.yaml | grep container_name | cut -d':' -f2)
- for container_name in $container_list; do
- cid=$(docker ps -aq --filter "name=$container_name")
- if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
- done
+ docker compose stop && docker compose rm -f
}
function main() {
diff --git a/DocSum/README.md b/DocSum/README.md
index 0a48212d4e..02c626e2da 100644
--- a/DocSum/README.md
+++ b/DocSum/README.md
@@ -56,11 +56,11 @@ source ./docker/set_env.sh
### Deploy on Gaudi
-Please find corresponding [docker_compose.yaml](./docker/gaudi/docker_compose.yaml).
+Please find corresponding [compose.yaml](./docker/gaudi/compose.yaml).
```bash
cd GenAIExamples/DocSum/docker/gaudi/
-docker compose -f docker_compose.yaml up -d
+docker compose -f compose.yaml up -d
```
> Notice: Currently only the Habana Driver 1.16.x is supported for Gaudi.
@@ -69,11 +69,11 @@ Please refer to the [Gaudi Guide](./docker/gaudi/README.md) to build docker imag
### Deploy on Xeon
-Please find corresponding [docker_compose.yaml](./docker/xeon/docker_compose.yaml).
+Please find corresponding [compose.yaml](./docker/xeon/compose.yaml).
```bash
cd GenAIExamples/DocSum/docker/xeon/
-docker compose -f docker_compose.yaml up -d
+docker compose up -d
```
Refer to the [Xeon Guide](./docker/xeon/README.md) for more instructions on building docker images from source.
@@ -122,6 +122,6 @@ curl http://${your_ip}:8008/generate \
-H 'Content-Type: application/json'
```
-2. (Docker only) If all microservices work well, please check the port ${host_ip}:8888, the port may be allocated by other users, you can modify the `docker_compose.yaml`.
+2. (Docker only) If all microservices work well, please check the port ${host_ip}:8888, the port may be allocated by other users, you can modify the `compose.yaml`.
-3. (Docker only) If you get errors like "The container name is in use", please change container name in `docker_compose.yaml`.
+3. (Docker only) If you get errors like "The container name is in use", please change container name in `compose.yaml`.
diff --git a/DocSum/docker/gaudi/README.md b/DocSum/docker/gaudi/README.md
index 290972d8b9..d61eb99be3 100644
--- a/DocSum/docker/gaudi/README.md
+++ b/DocSum/docker/gaudi/README.md
@@ -66,7 +66,7 @@ Then run the command `docker images`, you will have the following Docker Images:
### Setup Environment Variables
-Since the `docker_compose.yaml` will consume some environment variables, you need to setup them in advance as below.
+Since the `compose.yaml` will consume some environment variables, you need to setup them in advance as below.
```bash
export no_proxy=${your_no_proxy}
@@ -86,7 +86,7 @@ Note: Please replace with `host_ip` with your external IP address, do not use lo
```bash
cd GenAIExamples/DocSum/docker/gaudi
-docker compose -f docker_compose.yaml up -d
+docker compose up -d
```
### Validate Microservices
@@ -119,7 +119,7 @@ curl http://${host_ip}:8888/v1/docsum -H "Content-Type: application/json" -d '{
## Enable LangSmith to Monitor an Application (Optional)
-LangSmith offers a suite of tools to debug, evaluate, and monitor language models and intelligent agents. It can be used to assess benchmark data for each microservice. Before launching your services with `docker compose -f docker_compose.yaml up -d`, you need to enable LangSmith tracing by setting the `LANGCHAIN_TRACING_V2` environment variable to true and configuring your LangChain API key.
+LangSmith offers a suite of tools to debug, evaluate, and monitor language models and intelligent agents. It can be used to assess benchmark data for each microservice. Before launching your services with `docker compose up -d`, you need to enable LangSmith tracing by setting the `LANGCHAIN_TRACING_V2` environment variable to true and configuring your LangChain API key.
Here's how you can do it:
diff --git a/DocSum/docker/gaudi/docker_compose.yaml b/DocSum/docker/gaudi/compose.yaml
similarity index 97%
rename from DocSum/docker/gaudi/docker_compose.yaml
rename to DocSum/docker/gaudi/compose.yaml
index a381a9f422..44da5cea23 100644
--- a/DocSum/docker/gaudi/docker_compose.yaml
+++ b/DocSum/docker/gaudi/compose.yaml
@@ -5,7 +5,7 @@
version: "3.8"
services:
- tgi_service:
+ tgi-service:
image: ghcr.io/huggingface/tgi-gaudi:2.0.1
container_name: tgi-gaudi-server
ports:
@@ -27,7 +27,7 @@ services:
image: opea/llm-docsum-tgi:latest
container_name: llm-docsum-gaudi-server
depends_on:
- - tgi_service
+ - tgi-service
ports:
- "9000:9000"
ipc: host
@@ -45,7 +45,7 @@ services:
image: opea/docsum:latest
container_name: docsum-gaudi-backend-server
depends_on:
- - tgi_service
+ - tgi-service
- llm
ports:
- "8888:8888"
diff --git a/DocSum/docker/xeon/README.md b/DocSum/docker/xeon/README.md
index b915d26e8b..56bba3bfed 100644
--- a/DocSum/docker/xeon/README.md
+++ b/DocSum/docker/xeon/README.md
@@ -73,7 +73,7 @@ Then run the command `docker images`, you will have the following Docker Images:
### Setup Environment Variables
-Since the `docker_compose.yaml` will consume some environment variables, you need to setup them in advance as below.
+Since the `compose.yaml` will consume some environment variables, you need to setup them in advance as below.
```bash
export no_proxy=${your_no_proxy}
@@ -93,7 +93,7 @@ Note: Please replace with `host_ip` with your external IP address, do not use lo
```bash
cd GenAIExamples/DocSum/docker/xeon
-docker compose -f docker_compose.yaml up -d
+docker compose up -d
```
### Validate Microservices
@@ -128,7 +128,7 @@ Following the validation of all aforementioned microservices, we are now prepare
## Enable LangSmith to Monitor an Application (Optional)
-LangSmith offers tools to debug, evaluate, and monitor language models and intelligent agents. It can be used to assess benchmark data for each microservice. Before launching your services with `docker compose -f docker_compose.yaml up -d`, you need to enable LangSmith tracing by setting the `LANGCHAIN_TRACING_V2` environment variable to true and configuring your LangChain API key.
+LangSmith offers tools to debug, evaluate, and monitor language models and intelligent agents. It can be used to assess benchmark data for each microservice. Before launching your services with `docker compose -f compose.yaml up -d`, you need to enable LangSmith tracing by setting the `LANGCHAIN_TRACING_V2` environment variable to true and configuring your LangChain API key.
Here's how you can do it:
diff --git a/DocSum/docker/xeon/docker_compose.yaml b/DocSum/docker/xeon/compose.yaml
similarity index 96%
rename from DocSum/docker/xeon/docker_compose.yaml
rename to DocSum/docker/xeon/compose.yaml
index 6e5ab0be5a..2b6cdf03a4 100644
--- a/DocSum/docker/xeon/docker_compose.yaml
+++ b/DocSum/docker/xeon/compose.yaml
@@ -5,9 +5,9 @@
version: "3.8"
services:
- tgi_service:
+ tgi-service:
image: ghcr.io/huggingface/text-generation-inference:1.4
- container_name: tgi_service
+ container_name: tgi-service
ports:
- "8008:80"
environment:
@@ -24,7 +24,7 @@ services:
image: opea/llm-docsum-tgi:latest
container_name: llm-docsum-server
depends_on:
- - tgi_service
+ - tgi-service
ports:
- "9000:9000"
ipc: host
@@ -42,7 +42,7 @@ services:
image: opea/docsum:latest
container_name: docsum-xeon-backend-server
depends_on:
- - tgi_service
+ - tgi-service
- llm
ports:
- "8888:8888"
diff --git a/DocSum/docsum.yaml b/DocSum/docsum.yaml
index dcbb480bac..d4c8cb1c42 100644
--- a/DocSum/docsum.yaml
+++ b/DocSum/docsum.yaml
@@ -3,7 +3,7 @@
# SPDX-License-Identifier: Apache-2.0
opea_micro_services:
- tgi_service:
+ tgi-service:
host: ${TGI_SERVICE_IP}
ports: ${TGI_SERVICE_PORT}
image: ghcr.io/huggingface/tgi-gaudi:2.0.1
diff --git a/DocSum/tests/test_docsum_on_gaudi.sh b/DocSum/tests/test_docsum_on_gaudi.sh
index 00333dc07f..983f02870c 100644
--- a/DocSum/tests/test_docsum_on_gaudi.sh
+++ b/DocSum/tests/test_docsum_on_gaudi.sh
@@ -42,18 +42,26 @@ function start_services() {
if [[ "$IMAGE_REPO" != "" ]]; then
# Replace the container name with a test-specific name
echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
- sed -i "s#image: opea/docsum:latest#image: opea/docsum:${IMAGE_TAG}#g" docker_compose.yaml
- sed -i "s#image: opea/docsum-ui:latest#image: opea/docsum-ui:${IMAGE_TAG}#g" docker_compose.yaml
- sed -i "s#image: opea/docsum-react-ui:latest#image: opea/docsum-react-ui:${IMAGE_TAG}#g" docker_compose.yaml
- sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" docker_compose.yaml
- echo "cat docker_compose.yaml"
- cat docker_compose.yaml
+ sed -i "s#image: opea/docsum:latest#image: opea/docsum:${IMAGE_TAG}#g" compose.yaml
+ sed -i "s#image: opea/docsum-ui:latest#image: opea/docsum-ui:${IMAGE_TAG}#g" compose.yaml
+ sed -i "s#image: opea/docsum-react-ui:latest#image: opea/docsum-react-ui:${IMAGE_TAG}#g" compose.yaml
+ sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
+ echo "cat compose.yaml"
+ cat compose.yaml
fi
# Start Docker Containers
- docker compose -f docker_compose.yaml up -d
+ docker compose up -d
- sleep 5m # Waits 5 minutes
+ n=0
+ until [[ "$n" -ge 400 ]]; do
+ docker logs tgi-gaudi-server > ${LOG_PATH}/tgi_service_start.log
+ if grep -q Connected ${LOG_PATH}/tgi_service_start.log; then
+ break
+ fi
+ sleep 1s
+ n=$((n+1))
+ done
}
function validate_services() {
@@ -141,11 +149,7 @@ function validate_frontend() {
function stop_docker() {
cd $WORKPATH/docker/gaudi
- container_list=$(cat docker_compose.yaml | grep container_name | cut -d':' -f2)
- for container_name in $container_list; do
- cid=$(docker ps -aq --filter "name=$container_name")
- if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
- done
+ docker compose stop && docker compose rm -f
}
function main() {
diff --git a/DocSum/tests/test_docsum_on_xeon.sh b/DocSum/tests/test_docsum_on_xeon.sh
index 8101662dfd..991a3751b0 100644
--- a/DocSum/tests/test_docsum_on_xeon.sh
+++ b/DocSum/tests/test_docsum_on_xeon.sh
@@ -40,18 +40,25 @@ function start_services() {
if [[ "$IMAGE_REPO" != "" ]]; then
# Replace the container name with a test-specific name
echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
- sed -i "s#image: opea/docsum:latest#image: opea/docsum:${IMAGE_TAG}#g" docker_compose.yaml
- sed -i "s#image: opea/docsum-ui:latest#image: opea/docsum-ui:${IMAGE_TAG}#g" docker_compose.yaml
- sed -i "s#image: opea/docsum-react-ui:latest#image: opea/docsum-react-ui:${IMAGE_TAG}#g" docker_compose.yaml
- sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" docker_compose.yaml
- echo "cat docker_compose.yaml"
- cat docker_compose.yaml
+ sed -i "s#image: opea/docsum:latest#image: opea/docsum:${IMAGE_TAG}#g" compose.yaml
+ sed -i "s#image: opea/docsum-ui:latest#image: opea/docsum-ui:${IMAGE_TAG}#g" compose.yaml
+ sed -i "s#image: opea/docsum-react-ui:latest#image: opea/docsum-react-ui:${IMAGE_TAG}#g" compose.yaml
+ sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
+ echo "cat compose.yaml"
+ cat compose.yaml
fi
# Start Docker Containers
- docker compose -f docker_compose.yaml up -d
+ docker compose up -d
- sleep 5m # Waits 5 minutes
+ until [[ "$n" -ge 500 ]]; do
+ docker logs tgi-service > ${LOG_PATH}/tgi_service_start.log
+ if grep -q Connected ${LOG_PATH}/tgi_service_start.log; then
+ break
+ fi
+ sleep 1s
+ n=$((n+1))
+ done
}
function validate_services() {
@@ -90,7 +97,7 @@ function validate_microservices() {
"${ip_address}:8008/generate" \
"generated_text" \
"tgi-llm" \
- "tgi_service" \
+ "tgi-service" \
'{"inputs":"What is Deep Learning?","parameters":{"max_new_tokens":17, "do_sample": true}}'
# llm microservice
@@ -139,11 +146,7 @@ function validate_frontend() {
function stop_docker() {
cd $WORKPATH/docker/xeon
- container_list=$(cat docker_compose.yaml | grep container_name | cut -d':' -f2)
- for container_name in $container_list; do
- cid=$(docker ps -aq --filter "name=$container_name")
- if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
- done
+ docker compose stop && docker compose rm -f
}
function main() {
diff --git a/FaqGen/docker/gaudi/README.md b/FaqGen/docker/gaudi/README.md
index 63bd53631c..e10bc7d4b8 100644
--- a/FaqGen/docker/gaudi/README.md
+++ b/FaqGen/docker/gaudi/README.md
@@ -66,7 +66,7 @@ Then run the command `docker images`, you will have the following Docker Images:
### Setup Environment Variables
-Since the `docker_compose.yaml` will consume some environment variables, you need to setup them in advance as below.
+Since the `compose.yaml` will consume some environment variables, you need to setup them in advance as below.
```bash
export no_proxy=${your_no_proxy}
@@ -86,7 +86,7 @@ Note: Please replace with `host_ip` with your external IP address, do not use lo
```bash
cd GenAIExamples/FaqGen/docker/gaudi
-docker compose -f docker_compose.yaml up -d
+docker compose up -d
```
### Validate Microservices
@@ -119,7 +119,7 @@ curl http://${host_ip}:8888/v1/faqgen -H "Content-Type: application/json" -d '{
## Enable LangSmith to Monitor an Application (Optional)
-LangSmith offers a suite of tools to debug, evaluate, and monitor language models and intelligent agents. It can be used to assess benchmark data for each microservice. Before launching your services with `docker compose -f docker_compose.yaml up -d`, you need to enable LangSmith tracing by setting the `LANGCHAIN_TRACING_V2` environment variable to true and configuring your LangChain API key.
+LangSmith offers a suite of tools to debug, evaluate, and monitor language models and intelligent agents. It can be used to assess benchmark data for each microservice. Before launching your services with `docker compose -f compose.yaml up -d`, you need to enable LangSmith tracing by setting the `LANGCHAIN_TRACING_V2` environment variable to true and configuring your LangChain API key.
Here's how you can do it:
@@ -144,7 +144,7 @@ Open this URL `http://{host_ip}:5173` in your browser to access the frontend.
## 🚀 Launch the React UI (Optional)
-To access the FAQGen (react based) frontend, modify the UI service in the `docker_compose.yaml` file. Replace `faqgen-xeon-ui-server` service with the `faqgen-xeon-react-ui-server` service as per the config below:
+To access the FAQGen (react based) frontend, modify the UI service in the `compose.yaml` file. Replace `faqgen-xeon-ui-server` service with the `faqgen-xeon-react-ui-server` service as per the config below:
```bash
faqgen-xeon-react-ui-server:
diff --git a/FaqGen/docker/gaudi/docker_compose.yaml b/FaqGen/docker/gaudi/compose.yaml
similarity index 97%
rename from FaqGen/docker/gaudi/docker_compose.yaml
rename to FaqGen/docker/gaudi/compose.yaml
index 779576e571..e504a06b2f 100644
--- a/FaqGen/docker/gaudi/docker_compose.yaml
+++ b/FaqGen/docker/gaudi/compose.yaml
@@ -4,7 +4,7 @@
version: "3.8"
services:
- tgi_service:
+ tgi-service:
image: ghcr.io/huggingface/tgi-gaudi:2.0.1
container_name: tgi-gaudi-server
ports:
@@ -27,7 +27,7 @@ services:
image: opea/llm-faqgen-tgi:latest
container_name: llm-faqgen-server
depends_on:
- - tgi_service
+ - tgi-service
ports:
- "9000:9000"
ipc: host
@@ -45,7 +45,7 @@ services:
image: opea/faqgen:latest
container_name: faqgen-gaudi-backend-server
depends_on:
- - tgi_service
+ - tgi-service
- llm_faqgen
ports:
- "8888:8888"
diff --git a/FaqGen/docker/xeon/README.md b/FaqGen/docker/xeon/README.md
index 05224284c5..227904120f 100644
--- a/FaqGen/docker/xeon/README.md
+++ b/FaqGen/docker/xeon/README.md
@@ -65,7 +65,7 @@ Then run the command `docker images`, you will have the following Docker Images:
### Setup Environment Variables
-Since the `docker_compose.yaml` will consume some environment variables, you need to setup them in advance as below.
+Since the `compose.yaml` will consume some environment variables, you need to setup them in advance as below.
```bash
export no_proxy=${your_no_proxy}
@@ -85,7 +85,7 @@ Note: Please replace with `host_ip` with your external IP address, do not use lo
```bash
cd GenAIExamples/FaqGen/docker/xeon
-docker compose -f docker_compose.yaml up -d
+docker compose up -d
```
### Validate Microservices
@@ -120,7 +120,7 @@ Following the validation of all aforementioned microservices, we are now prepare
## Enable LangSmith to Monitor an Application (Optional)
-LangSmith offers tools to debug, evaluate, and monitor language models and intelligent agents. It can be used to assess benchmark data for each microservice. Before launching your services with `docker compose -f docker_compose.yaml up -d`, you need to enable LangSmith tracing by setting the `LANGCHAIN_TRACING_V2` environment variable to true and configuring your LangChain API key.
+LangSmith offers tools to debug, evaluate, and monitor language models and intelligent agents. It can be used to assess benchmark data for each microservice. Before launching your services with `docker compose -f compose.yaml up -d`, you need to enable LangSmith tracing by setting the `LANGCHAIN_TRACING_V2` environment variable to true and configuring your LangChain API key.
Here's how you can do it:
@@ -145,7 +145,7 @@ Open this URL `http://{host_ip}:5173` in your browser to access the frontend.
## 🚀 Launch the React UI (Optional)
-To access the FAQGen (react based) frontend, modify the UI service in the `docker_compose.yaml` file. Replace `faqgen-xeon-ui-server` service with the `faqgen-xeon-react-ui-server` service as per the config below:
+To access the FAQGen (react based) frontend, modify the UI service in the `compose.yaml` file. Replace `faqgen-xeon-ui-server` service with the `faqgen-xeon-react-ui-server` service as per the config below:
```bash
faqgen-xeon-react-ui-server:
diff --git a/FaqGen/docker/xeon/docker_compose.yaml b/FaqGen/docker/xeon/compose.yaml
similarity index 97%
rename from FaqGen/docker/xeon/docker_compose.yaml
rename to FaqGen/docker/xeon/compose.yaml
index 280adab8a5..d5e29f7789 100644
--- a/FaqGen/docker/xeon/docker_compose.yaml
+++ b/FaqGen/docker/xeon/compose.yaml
@@ -4,7 +4,7 @@
version: "3.8"
services:
- tgi_service:
+ tgi-service:
image: ghcr.io/huggingface/text-generation-inference:1.4
container_name: tgi_xeon_server
ports:
@@ -23,7 +23,7 @@ services:
image: opea/llm-faqgen-tgi:latest
container_name: llm-faqgen-server
depends_on:
- - tgi_service
+ - tgi-service
ports:
- "9000:9000"
ipc: host
@@ -41,7 +41,7 @@ services:
image: opea/faqgen:latest
container_name: faqgen-xeon-backend-server
depends_on:
- - tgi_service
+ - tgi-service
- llm_faqgen
ports:
- "8888:8888"
diff --git a/FaqGen/faqgen.yaml b/FaqGen/faqgen.yaml
index 02a675959d..8832c0c939 100644
--- a/FaqGen/faqgen.yaml
+++ b/FaqGen/faqgen.yaml
@@ -3,7 +3,7 @@
# SPDX-License-Identifier: Apache-2.0
opea_micro_services:
- tgi_service:
+ tgi-service:
host: ${TGI_SERVICE_IP}
ports: ${TGI_SERVICE_PORT}
image: ghcr.io/huggingface/tgi-gaudi:1.2.1
diff --git a/FaqGen/tests/test_faqgen_on_gaudi.sh b/FaqGen/tests/test_faqgen_on_gaudi.sh
index 1fb7da34a4..c41940d614 100644
--- a/FaqGen/tests/test_faqgen_on_gaudi.sh
+++ b/FaqGen/tests/test_faqgen_on_gaudi.sh
@@ -41,15 +41,23 @@ function start_services() {
# if [[ "$IMAGE_REPO" != "" ]]; then
# # Replace the container name with a test-specific name
# echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
- # sed -i "s#image: opea/faqgen:latest#image: opea/faqgen:${IMAGE_TAG}#g" docker_compose.yaml
- # sed -i "s#image: opea/faqgen-ui:latest#image: opea/faqgen-ui:${IMAGE_TAG}#g" docker_compose.yaml
- # sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" docker_compose.yaml
+ # sed -i "s#image: opea/faqgen:latest#image: opea/faqgen:${IMAGE_TAG}#g" compose.yaml
+ # sed -i "s#image: opea/faqgen-ui:latest#image: opea/faqgen-ui:${IMAGE_TAG}#g" compose.yaml
+ # sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
# fi
# Start Docker Containers
- docker compose -f docker_compose.yaml up -d
+ docker compose up -d
- sleep 4m # Waits 4 minutes
+ n=0
+ until [[ "$n" -ge 400 ]]; do
+ docker logs tgi-gaudi-server > ${LOG_PATH}/tgi_service_start.log
+ if grep -q Connected ${LOG_PATH}/tgi_service_start.log; then
+ break
+ fi
+ sleep 1s
+ n=$((n+1))
+ done
}
function validate_services() {
@@ -87,7 +95,7 @@ function validate_microservices() {
validate_services \
"${ip_address}:8008/generate" \
"generated_text" \
- "tgi_service" \
+ "tgi-service" \
"tgi-gaudi-server" \
'{"inputs":"What is Deep Learning?","parameters":{"max_new_tokens":17, "do_sample": true}}'
@@ -137,11 +145,7 @@ function validate_frontend() {
function stop_docker() {
cd $WORKPATH/docker/gaudi
- container_list=$(cat docker_compose.yaml | grep container_name | cut -d':' -f2)
- for container_name in $container_list; do
- cid=$(docker ps -aq --filter "name=$container_name")
- if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
- done
+ docker compose stop && docker compose rm -f
}
function main() {
diff --git a/FaqGen/tests/test_faqgen_on_xeon.sh b/FaqGen/tests/test_faqgen_on_xeon.sh
index 3c5d4b0cbb..f72baf5034 100755
--- a/FaqGen/tests/test_faqgen_on_xeon.sh
+++ b/FaqGen/tests/test_faqgen_on_xeon.sh
@@ -39,15 +39,23 @@ function start_services() {
# if [[ "$IMAGE_REPO" != "" ]]; then
# # Replace the container name with a test-specific name
# echo "using image repository $IMAGE_REPO and image tag $IMAGE_TAG"
- # sed -i "s#image: opea/faqgen:latest#image: opea/faqgen:${IMAGE_TAG}#g" docker_compose.yaml
- # sed -i "s#image: opea/faqgen-ui:latest#image: opea/faqgen-ui:${IMAGE_TAG}#g" docker_compose.yaml
- # sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" docker_compose.yaml
+ # sed -i "s#image: opea/faqgen:latest#image: opea/faqgen:${IMAGE_TAG}#g" compose.yaml
+ # sed -i "s#image: opea/faqgen-ui:latest#image: opea/faqgen-ui:${IMAGE_TAG}#g" compose.yaml
+ # sed -i "s#image: opea/*#image: ${IMAGE_REPO}opea/#g" compose.yaml
# fi
# Start Docker Containers
- docker compose -f docker_compose.yaml up -d
+ docker compose up -d
- sleep 4m # Waits 4 minutes
+ n=0
+ until [[ "$n" -ge 400 ]]; do
+ docker logs tgi-xeon-server > ${LOG_PATH}/tgi_service_start.log
+ if grep -q Connected ${LOG_PATH}/tgi_service_start.log; then
+ break
+ fi
+ sleep 1s
+ n=$((n+1))
+ done
}
function validate_services() {
@@ -85,7 +93,7 @@ function validate_microservices() {
validate_services \
"${ip_address}:8008/generate" \
"generated_text" \
- "tgi_service" \
+ "tgi-service" \
"tgi_xeon_server" \
'{"inputs":"What is Deep Learning?","parameters":{"max_new_tokens":17, "do_sample": true}}'
@@ -135,11 +143,7 @@ function validate_frontend() {
function stop_docker() {
cd $WORKPATH/docker/xeon
- container_list=$(cat docker_compose.yaml | grep container_name | cut -d':' -f2)
- for container_name in $container_list; do
- cid=$(docker ps -aq --filter "name=$container_name")
- if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
- done
+ docker compose stop && docker compose rm -f
}
function main() {
diff --git a/SearchQnA/docker/gaudi/compose.yaml b/SearchQnA/docker/gaudi/compose.yaml
index adc6833cd2..eb9e38cef2 100644
--- a/SearchQnA/docker/gaudi/compose.yaml
+++ b/SearchQnA/docker/gaudi/compose.yaml
@@ -172,8 +172,6 @@ services:
ipc: host
restart: always
-
-
networks:
default:
driver: bridge
diff --git a/SearchQnA/tests/test_searchqna_on_gaudi.sh b/SearchQnA/tests/test_searchqna_on_gaudi.sh
index 6c1e44324b..60e57ccb93 100644
--- a/SearchQnA/tests/test_searchqna_on_gaudi.sh
+++ b/SearchQnA/tests/test_searchqna_on_gaudi.sh
@@ -141,7 +141,7 @@ function validate_frontend() {
function stop_docker() {
cd $WORKPATH/docker/gaudi
- docker compose down
+ docker compose stop && docker compose rm -f
}
function main() {
diff --git a/SearchQnA/tests/test_searchqna_on_xeon.sh b/SearchQnA/tests/test_searchqna_on_xeon.sh
index eb82cc6706..31f8c0b0be 100644
--- a/SearchQnA/tests/test_searchqna_on_xeon.sh
+++ b/SearchQnA/tests/test_searchqna_on_xeon.sh
@@ -123,7 +123,7 @@ function validate_frontend() {
function stop_docker() {
cd $WORKPATH/docker/xeon
- docker compose down
+ docker compose stop && docker compose rm -f
}
function main() {
diff --git a/Translation/docker/gaudi/compose.yaml b/Translation/docker/gaudi/compose.yaml
index 0742c2a049..1d77edcbb0 100644
--- a/Translation/docker/gaudi/compose.yaml
+++ b/Translation/docker/gaudi/compose.yaml
@@ -15,9 +15,9 @@
version: "3.8"
services:
- tgi_service:
+ tgi-service:
image: ghcr.io/huggingface/tgi-gaudi:2.0.1
- container_name: tgi_gaudi_service
+ container_name: tgi-gaudi-server
ports:
- "8008:80"
environment:
@@ -32,7 +32,7 @@ services:
image: opea/llm-tgi:latest
container_name: llm-tgi-gaudi-server
depends_on:
- - tgi_service
+ - tgi-service
ports:
- "9000:9000"
ipc: host
@@ -46,7 +46,7 @@ services:
image: opea/translation:latest
container_name: translation-gaudi-backend-server
depends_on:
- - tgi_service
+ - tgi-service
- llm
ports:
- "8888:8888"
diff --git a/Translation/docker/xeon/compose.yaml b/Translation/docker/xeon/compose.yaml
index 4f627223e7..bfbdf0117f 100644
--- a/Translation/docker/xeon/compose.yaml
+++ b/Translation/docker/xeon/compose.yaml
@@ -15,9 +15,9 @@
version: "3.8"
services:
- tgi_service:
+ tgi-service:
image: ghcr.io/huggingface/text-generation-inference:1.4
- container_name: tgi_service
+ container_name: tgi-service
ports:
- "8008:80"
environment:
@@ -33,7 +33,7 @@ services:
image: opea/llm-tgi:latest
container_name: llm-tgi-server
depends_on:
- - tgi_service
+ - tgi-service
ports:
- "9000:9000"
ipc: host
@@ -50,7 +50,7 @@ services:
image: opea/translation:latest
container_name: translation-xeon-backend-server
depends_on:
- - tgi_service
+ - tgi-service
- llm
ports:
- "8888:8888"
diff --git a/Translation/tests/test_translation_on_gaudi.sh b/Translation/tests/test_translation_on_gaudi.sh
index 28081356ed..c5060a165a 100644
--- a/Translation/tests/test_translation_on_gaudi.sh
+++ b/Translation/tests/test_translation_on_gaudi.sh
@@ -50,7 +50,15 @@ function start_services() {
# Start Docker Containers
docker compose up -d
- sleep 2m # Waits 2 minutes
+ n=0
+ until [[ "$n" -ge 500 ]]; do
+ docker logs tgi-gaudi-server > ${LOG_PATH}/tgi_service_start.log
+ if grep -q Connected ${LOG_PATH}/tgi_service_start.log; then
+ break
+ fi
+ sleep 1s
+ n=$((n+1))
+ done
}
function validate_services() {
@@ -92,7 +100,7 @@ function validate_microservices() {
"${ip_address}:8008/generate" \
"generated_text" \
"tgi-gaudi" \
- "tgi_gaudi_service" \
+ "tgi-gaudi-service" \
'{"inputs":"What is Deep Learning?","parameters":{"max_new_tokens":17, "do_sample": true}}'
# llm microservice
@@ -141,7 +149,7 @@ function validate_frontend() {
function stop_docker() {
cd $WORKPATH/docker/gaudi
- docker compose down
+ docker compose stop && docker compose rm -f
}
function main() {
diff --git a/Translation/tests/test_translation_on_xeon.sh b/Translation/tests/test_translation_on_xeon.sh
index 698eaeb409..3f460a23bc 100644
--- a/Translation/tests/test_translation_on_xeon.sh
+++ b/Translation/tests/test_translation_on_xeon.sh
@@ -49,7 +49,15 @@ function start_services() {
# Start Docker Containers
docker compose up -d
- sleep 2m # Waits 2 minutes
+ n=0
+ until [[ "$n" -ge 500 ]]; do
+ docker logs tgi-service > ${LOG_PATH}/tgi_service_start.log
+ if grep -q Connected ${LOG_PATH}/tgi_service_start.log; then
+ break
+ fi
+ sleep 1s
+ n=$((n+1))
+ done
}
function validate_services() {
@@ -89,7 +97,7 @@ function validate_microservices() {
"${ip_address}:8008/generate" \
"generated_text" \
"tgi" \
- "tgi_service" \
+ "tgi-service" \
'{"inputs":"What is Deep Learning?","parameters":{"max_new_tokens":17, "do_sample": true}}'
# llm microservice
@@ -138,7 +146,7 @@ function validate_frontend() {
function stop_docker() {
cd $WORKPATH/docker/xeon
- docker compose down
+ docker compose stop && docker compose rm -f
}
function main() {
diff --git a/Translation/translation.yaml b/Translation/translation.yaml
index c58e89e510..23aac46758 100644
--- a/Translation/translation.yaml
+++ b/Translation/translation.yaml
@@ -3,7 +3,7 @@
# SPDX-License-Identifier: Apache-2.0
opea_micro_services:
- tgi_service:
+ tgi-service:
host: ${TGI_SERVICE_IP}
ports: ${TGI_SERVICE_PORT}
image: ghcr.io/huggingface/tgi-gaudi:2.0.1