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:21:53 -07:00
|
|
|
pwd
|
2024-10-26 14:23:05 -07:00
|
|
|
|
2024-10-26 14:23:54 -07:00
|
|
|
. ./common_scripts.sh
|
2024-10-26 14:14:10 -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-26 15:57:31 -07:00
|
|
|
poetry run archgw_modelserver restart &
|
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-26 16:24:45 -07:00
|
|
|
docker compose down
|
2024-10-26 15:57:31 -07:00
|
|
|
log waiting for model service to be healthy
|
2024-10-26 16:35:20 -07:00
|
|
|
wait_for_healthz "http://localhost:51000/healthz" 600 # wait for 10 mins
|
2024-10-26 16:24:45 -07:00
|
|
|
docker compose 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-26 16:14:25 -07:00
|
|
|
docker compose 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 -
|