From 65ba950a3681ccf4f8611d55600d7aba7229803a Mon Sep 17 00:00:00 2001 From: RunningLeon Date: Wed, 27 Dec 2023 09:41:50 +0800 Subject: [PATCH 1/2] update --- .github/workflows/test.yml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 01134e69b9..5b4447d5f6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -130,14 +130,13 @@ jobs: run: | export CONTAINER_ID=$(docker create \ --rm \ - --gpus='"device=0,1"' \ + --gpus='"device=4,5"' \ --shm-size 16g \ --cap-add=SYS_PTRACE \ --cap-add=SYS_ADMIN \ --security-opt seccomp=unconfined \ - --name lmdeploy-ci-triton \ + --name "lmdeploy-ci-triton-$GITHUB_RUN_ID" \ --workdir /__w/lmdeploy/lmdeploy \ - --env PIP_CACHE_DIR=/root/.cache/pip \ --env NCCL_LAUNCH_MODE=GROUP \ -v $(pwd)/../../:/__w \ -v ${HF_MODEL}:/root/workspace/hf_model \ @@ -151,12 +150,14 @@ jobs: echo "CONTAINER_ID=$CONTAINER_ID" >> $GITHUB_ENV - name: Build lmdeploy from source run: | - docker exec $CONTAINER_ID cp -r ../../build build + docker exec $CONTAINER_ID mkdir build docker exec --workdir /__w/lmdeploy/lmdeploy/build \ --env http_proxy=${{secrets.PROXY}} \ --env https_proxy=${{secrets.PROXY}} \ --env HTTP_PROXY=${{secrets.PROXY}} \ --env HTTPS_PROXY=${{secrets.PROXY}} \ + --env no_proxy="localhost,127.0.0.1" \ + --env NO_PROXY="localhost,127.0.0.1" \ $CONTAINER_ID cmake .. \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_EXPORT_COMPILE_COMMANDS=1 \ @@ -198,21 +199,27 @@ jobs: --dst-path /root/workspace/workdir/${TB_MODEL} - name: Start triton server service run: | - docker exec --detach $CONTAINER_ID \ - tritonserver \ + docker exec --detach $CONTAINER_ID bash -c \ + "tritonserver \ --model-repository=/root/workspace/workdir/${TB_MODEL}/model_repository \ --allow-http=0 \ --allow-grpc=1 \ --grpc-port=${GRPC_PORT} \ - --log-verbose=0 \ - --allow-metrics=1 + --log-verbose=1 \ + --allow-metrics=1 > run.log 2>&1 ; touch finish.txt" # wait for triton server to fully start up sleep 180s + # print triton server log file + cat run.log + python3 -c 'import os; assert not os.path.exists("finish.txt"), "Failed to start tritonserver"' - name: Test triton server run: | docker exec \ --env no_proxy="localhost,127.0.0.1" \ + --env NO_PROXY="localhost,127.0.0.1" \ $CONTAINER_ID python3 .github/scripts/test_triton_server.py --port ${GRPC_PORT} + # print triton server log file + cat run.log - name: Clear workfile if: always() run: | From 0c544f8871309f390927b6c8a006ec6dbb58979c Mon Sep 17 00:00:00 2001 From: RunningLeon Date: Wed, 27 Dec 2023 15:07:31 +0800 Subject: [PATCH 2/2] update --- .github/scripts/test_triton_server.py | 4 ++-- .github/workflows/test.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/scripts/test_triton_server.py b/.github/scripts/test_triton_server.py index a5146b150c..d44fa3c3d9 100644 --- a/.github/scripts/test_triton_server.py +++ b/.github/scripts/test_triton_server.py @@ -43,7 +43,7 @@ def test(port=33337): all_pass = True for cases in test_cases: quest = cases['prompts'] - keywords = cases['keywords'] + keywords = [k.lower() for k in cases['keywords']] inputs = quest + end print(f'Test Input prompts: {quest}\nKey words: {keywords}') time.sleep(5) @@ -58,7 +58,7 @@ def test(port=33337): out, err = proc.communicate(input=inputs) print(f'Output: {out}') if proc.returncode == 0: - out = parse_dialogue(out)[0] + out = parse_dialogue(out)[0].lower() success = any([k in out for k in keywords]) if not success: print(f'>>> Failed to output keywords: {out} {keywords}') diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5b4447d5f6..d562584c25 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -205,7 +205,7 @@ jobs: --allow-http=0 \ --allow-grpc=1 \ --grpc-port=${GRPC_PORT} \ - --log-verbose=1 \ + --log-verbose=0 \ --allow-metrics=1 > run.log 2>&1 ; touch finish.txt" # wait for triton server to fully start up sleep 180s