2024-10-26 15:32:46 -07:00
|
|
|
#/bin/bash
|
2024-10-26 14:14:10 -07:00
|
|
|
# if any of the commands fail, the script will exit
|
|
|
|
|
set -e
|
|
|
|
|
|
2024-10-26 14:23:54 -07:00
|
|
|
. ./common_scripts.sh
|
2024-10-26 14:14:10 -07:00
|
|
|
|
2024-10-27 15:51:20 -07:00
|
|
|
print_debug() {
|
|
|
|
|
log "Received signal to stop"
|
|
|
|
|
log "Printing debug logs for model_server"
|
|
|
|
|
log "===================================="
|
2024-10-27 15:51:51 -07:00
|
|
|
tail -n 500 ~/archgw_logs/modelserver.log
|
2024-10-27 15:51:20 -07:00
|
|
|
log "Printing debug logs for docker"
|
|
|
|
|
log "===================================="
|
|
|
|
|
tail -n 500 ../build.log
|
|
|
|
|
}
|
|
|
|
|
|
2024-10-27 18:54:32 -07:00
|
|
|
trap 'print_debug' INT TERM ERR
|
2024-10-27 15:51:20 -07:00
|
|
|
|
2024-10-26 16:24:45 -07:00
|
|
|
log starting > ../build.log
|
|
|
|
|
|
2024-10-26 14:14:10 -07:00
|
|
|
log building function_callling demo
|
2024-10-26 15:19:29 -07:00
|
|
|
log ===============================
|
2024-10-26 14:29:46 -07:00
|
|
|
cd ../demos/function_calling
|
2024-10-26 16:24:45 -07:00
|
|
|
docker compose build -q
|
2024-10-26 14:14:10 -07:00
|
|
|
|
|
|
|
|
log starting the function_calling demo
|
2024-10-26 16:24:45 -07:00
|
|
|
docker compose up -d
|
2024-10-26 14:29:46 -07:00
|
|
|
cd -
|
2024-10-26 14:14:10 -07:00
|
|
|
|
|
|
|
|
log building model server
|
2024-10-26 15:19:29 -07:00
|
|
|
log =====================
|
2024-10-26 14:29:46 -07:00
|
|
|
cd ../model_server
|
2024-10-26 16:14:25 -07:00
|
|
|
poetry install 2>&1 >> ../build.log
|
2024-10-26 14:14:10 -07:00
|
|
|
log starting model server
|
2024-10-26 16:03:31 -07:00
|
|
|
log =====================
|
2024-10-28 14:25:34 -07:00
|
|
|
mkdir -p ~/archgw_logs
|
2024-10-28 14:19:45 -07:00
|
|
|
touch ~/archgw_logs/modelserver.log
|
2024-10-26 15:57:31 -07:00
|
|
|
poetry run archgw_modelserver restart &
|
2024-10-27 19:00:37 -07:00
|
|
|
tail -F ~/archgw_logs/modelserver.log &
|
|
|
|
|
model_server_tail_pid=$!
|
2024-10-26 14:29:46 -07:00
|
|
|
cd -
|
2024-10-26 14:14:10 -07:00
|
|
|
|
2024-10-26 15:21:46 -07:00
|
|
|
log building llm and prompt gateway rust modules
|
|
|
|
|
log ============================================
|
|
|
|
|
cd ../arch
|
2024-10-26 16:24:45 -07:00
|
|
|
docker build -f Dockerfile .. -t katanemo/archgw -q
|
2024-10-26 15:21:46 -07:00
|
|
|
log starting the arch gateway service
|
2024-10-26 15:30:05 -07:00
|
|
|
log =================================
|
2024-10-27 00:10:36 -07:00
|
|
|
docker compose -f docker-compose.e2e.yaml down
|
2024-10-26 15:57:31 -07:00
|
|
|
log waiting for model service to be healthy
|
2024-10-28 14:12:48 -07:00
|
|
|
wait_for_healthz "http://localhost:51000/healthz" 300
|
2024-10-27 19:00:37 -07:00
|
|
|
kill $model_server_tail_pid
|
2024-10-27 00:10:36 -07:00
|
|
|
docker compose -f docker-compose.e2e.yaml up -d
|
2024-10-26 15:57:31 -07:00
|
|
|
log waiting for arch gateway service to be healthy
|
2024-10-26 15:21:46 -07:00
|
|
|
wait_for_healthz "http://localhost:10000/healthz" 60
|
2024-10-26 15:57:31 -07:00
|
|
|
log waiting for arch gateway service to be healthy
|
2024-10-26 15:21:46 -07:00
|
|
|
cd -
|
|
|
|
|
|
2024-10-26 14:14:10 -07:00
|
|
|
log running e2e tests
|
2024-10-26 15:19:29 -07:00
|
|
|
log =================
|
2024-10-26 16:14:25 -07:00
|
|
|
poetry install 2>&1 >> ../build.log
|
2024-10-26 14:14:10 -07:00
|
|
|
poetry run pytest
|
|
|
|
|
|
|
|
|
|
log shutting down the arch gateway service
|
2024-10-26 15:19:29 -07:00
|
|
|
log ======================================
|
2024-10-26 14:29:46 -07:00
|
|
|
cd ../arch
|
2024-10-27 00:10:36 -07:00
|
|
|
docker compose -f docker-compose.e2e.yaml stop 2>&1 >> ../build.log
|
2024-10-26 14:29:46 -07:00
|
|
|
cd -
|
2024-10-26 14:14:10 -07:00
|
|
|
|
|
|
|
|
log shutting down the function_calling demo
|
2024-10-26 15:19:29 -07:00
|
|
|
log =======================================
|
2024-10-26 14:29:46 -07:00
|
|
|
cd ../demos/function_calling
|
2024-10-26 16:14:25 -07:00
|
|
|
docker compose down 2>&1 >> ../build.log
|
2024-10-26 14:29:46 -07:00
|
|
|
cd -
|
2024-10-26 16:42:01 -07:00
|
|
|
|
|
|
|
|
log shutting down the model server
|
|
|
|
|
log ==============================
|
|
|
|
|
cd ../model_server
|
|
|
|
|
poetry run archgw_modelserver stop 2>&1 >> ../build.log
|
|
|
|
|
cd -
|