Use large github action machine to run e2e tests (#230)

This commit is contained in:
Adil Hafeez 2024-10-30 17:54:51 -07:00 committed by GitHub
parent bb882fb59b
commit e462e393b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 4725 additions and 441 deletions

View file

@ -4,6 +4,11 @@ set -e
. ./common_scripts.sh
print_disk_usage
mkdir -p ~/archgw_logs
touch ~/archgw_logs/modelserver.log
print_debug() {
log "Received signal to stop"
log "Printing debug logs for model_server"
@ -18,63 +23,62 @@ trap 'print_debug' INT TERM ERR
log starting > ../build.log
log building function_callling demo
log ===============================
log building and running function_callling demo
log ===========================================
cd ../demos/function_calling
docker compose build -q
log starting the function_calling demo
docker compose up -d
docker compose up api_server --build -d
cd -
log building model server
log =====================
print_disk_usage
log building and install model server
log =================================
cd ../model_server
poetry install 2>&1 >> ../build.log
log starting model server
log =====================
mkdir -p ~/archgw_logs
touch ~/archgw_logs/modelserver.log
poetry run archgw_modelserver restart &
poetry install
cd -
print_disk_usage
log building and installing archgw cli
log ==================================
cd ../arch/tools
sh build_cli.sh
cd -
print_disk_usage
log building docker image for arch gateway
log ======================================
cd ../
archgw build
cd -
print_disk_usage
log startup arch gateway with function calling demo
cd ..
tail -F ~/archgw_logs/modelserver.log &
model_server_tail_pid=$!
archgw down
archgw up demos/function_calling/arch_config.yaml
kill $model_server_tail_pid
cd -
log building llm and prompt gateway rust modules
log ============================================
cd ../arch
docker build -f Dockerfile .. -t katanemo/archgw -q
log starting the arch gateway service
log =================================
docker compose -f docker-compose.e2e.yaml down
log waiting for model service to be healthy
wait_for_healthz "http://localhost:51000/healthz" 300
kill $model_server_tail_pid
docker compose -f docker-compose.e2e.yaml up -d
log waiting for arch gateway service to be healthy
wait_for_healthz "http://localhost:10000/healthz" 60
log waiting for arch gateway service to be healthy
cd -
print_disk_usage
log running e2e tests
log =================
poetry install 2>&1 >> ../build.log
poetry install
poetry run pytest
log shutting down the arch gateway service
log ======================================
cd ../arch
docker compose -f docker-compose.e2e.yaml stop 2>&1 >> ../build.log
cd ../
archgw down
cd -
log shutting down the function_calling demo
log =======================================
cd ../demos/function_calling
docker compose down 2>&1 >> ../build.log
cd -
log shutting down the model server
log ==============================
cd ../model_server
poetry run archgw_modelserver stop 2>&1 >> ../build.log
docker compose down
cd -