2024-10-28 20:05:06 -04:00
|
|
|
#/bin/bash
|
|
|
|
|
# if any of the commands fail, the script will exit
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
. ./common_scripts.sh
|
|
|
|
|
|
2024-10-30 17:54:51 -07:00
|
|
|
print_disk_usage
|
|
|
|
|
|
|
|
|
|
mkdir -p ~/archgw_logs
|
|
|
|
|
touch ~/archgw_logs/modelserver.log
|
|
|
|
|
|
2024-10-28 20:05:06 -04:00
|
|
|
print_debug() {
|
|
|
|
|
log "Received signal to stop"
|
|
|
|
|
log "Printing debug logs for model_server"
|
|
|
|
|
log "===================================="
|
2024-11-26 13:13:02 -08:00
|
|
|
tail -n 100 ~/archgw_logs/modelserver.log
|
2024-10-28 20:05:06 -04:00
|
|
|
log "Printing debug logs for docker"
|
|
|
|
|
log "===================================="
|
2024-11-26 13:13:02 -08:00
|
|
|
tail -n 100 ../build.log
|
|
|
|
|
archgw logs --debug | tail -n 100
|
2024-10-28 20:05:06 -04:00
|
|
|
}
|
|
|
|
|
|
2024-11-26 13:13:02 -08:00
|
|
|
trap 'print_debug' INT TERM ERR
|
2024-10-28 20:05:06 -04:00
|
|
|
|
|
|
|
|
log starting > ../build.log
|
|
|
|
|
|
2024-10-30 17:54:51 -07:00
|
|
|
log building and running function_callling demo
|
|
|
|
|
log ===========================================
|
2024-12-20 13:25:01 -08:00
|
|
|
cd ../../demos/weather_forecast/
|
2024-11-07 22:11:00 -06:00
|
|
|
docker compose up weather_forecast_service --build -d
|
2024-10-28 20:05:06 -04:00
|
|
|
cd -
|
|
|
|
|
|
2024-10-30 17:54:51 -07:00
|
|
|
log building and install model server
|
|
|
|
|
log =================================
|
2024-12-20 13:25:01 -08:00
|
|
|
cd ../../model_server
|
2024-10-30 17:54:51 -07:00
|
|
|
poetry install
|
2024-10-28 20:05:06 -04:00
|
|
|
cd -
|
|
|
|
|
|
2024-10-30 17:54:51 -07:00
|
|
|
log building and installing archgw cli
|
|
|
|
|
log ==================================
|
2024-12-20 13:25:01 -08:00
|
|
|
cd ../../arch/tools
|
2024-12-06 15:48:07 -08:00
|
|
|
poetry install
|
2024-10-30 17:54:51 -07:00
|
|
|
cd -
|
|
|
|
|
|
|
|
|
|
log building docker image for arch gateway
|
|
|
|
|
log ======================================
|
2024-12-20 13:25:01 -08:00
|
|
|
cd ../../
|
2024-10-30 17:54:51 -07:00
|
|
|
archgw build
|
|
|
|
|
cd -
|
|
|
|
|
|
|
|
|
|
log startup arch gateway with function calling demo
|
2024-12-20 13:25:01 -08:00
|
|
|
cd ../../
|
2024-10-30 17:54:51 -07:00
|
|
|
tail -F ~/archgw_logs/modelserver.log &
|
|
|
|
|
model_server_tail_pid=$!
|
|
|
|
|
archgw down
|
2024-11-07 22:11:00 -06:00
|
|
|
archgw up demos/weather_forecast/arch_config.yaml
|
2024-10-28 20:05:06 -04:00
|
|
|
kill $model_server_tail_pid
|
|
|
|
|
cd -
|
|
|
|
|
|
|
|
|
|
log running e2e tests
|
|
|
|
|
log =================
|
2024-10-30 17:54:51 -07:00
|
|
|
poetry install
|
2024-10-28 20:05:06 -04:00
|
|
|
poetry run pytest
|
|
|
|
|
|
|
|
|
|
log shutting down the arch gateway service
|
|
|
|
|
log ======================================
|
2024-10-30 17:54:51 -07:00
|
|
|
archgw down
|
2024-10-28 20:05:06 -04:00
|
|
|
|
2024-11-07 22:11:00 -06:00
|
|
|
log shutting down the weather_forecast demo
|
2024-10-28 20:05:06 -04:00
|
|
|
log =======================================
|
2024-12-20 13:25:01 -08:00
|
|
|
cd ../../demos/weather_forecast
|
2024-10-30 17:54:51 -07:00
|
|
|
docker compose down
|
2024-10-28 20:05:06 -04:00
|
|
|
cd -
|