From 37a85d2a71a25ed24a0f004403caa40e7e3881a6 Mon Sep 17 00:00:00 2001 From: Guoyun Tian <88619302+BlitherBoom812@users.noreply.github.com> Date: Wed, 8 May 2024 03:51:28 +0800 Subject: [PATCH] fix(run.sh) and requierments --- CAPI/python/requirements.txt | 4 ++-- dependency/shell/run.sh | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CAPI/python/requirements.txt b/CAPI/python/requirements.txt index 1c67a0db..a5dab242 100644 --- a/CAPI/python/requirements.txt +++ b/CAPI/python/requirements.txt @@ -1,3 +1,3 @@ -grpcio==1.54.2 -grpcio-tools==1.62.1 +grpcio==1.62.2 +grpcio-tools==1.62.2 numpy diff --git a/dependency/shell/run.sh b/dependency/shell/run.sh index 30f3608e..dc4c42f7 100644 --- a/dependency/shell/run.sh +++ b/dependency/shell/run.sh @@ -84,7 +84,7 @@ function retry_command { if [ "$TERMINAL" = "SERVER" ]; then map_path=$map_dir/$MAP_ID.txt # allow spectator always. - nice -10 ./Server --port 8888 --studentCount 4 --trickerCount 1 --resultFileName $playback_dir/result --gameTimeInSecond $GAME_TIME --mode $MODE_NUM --mapResource $map_path --url $SCORE_URL --token $TOKEN --fileName $playback_dir/video --startLockFile $playback_dir/start.lock > $playback_dir/server.log 2>&1 & + nice -10 ./Server --port 8888 --studentCount 4 --trickerCount 1 --resultFileName $playback_dir/result --gameTimeInSecond $GAME_TIME --mode $MODE_NUM --mapResource $map_path --url $SCORE_URL --token $TOKEN --fileName $playback_dir/playback --startLockFile $playback_dir/start.lock > $playback_dir/server.log 2>&1 & server_pid=$! echo "server pid: $server_pid" ls $playback_dir @@ -139,9 +139,9 @@ if [ "$TERMINAL" = "SERVER" ]; then echo "Finish!" else echo "Failed to start game." - touch $playback_dir/finish.lock + # touch $playback_dir/finish.lock touch temp.lock - mv -f temp.lock $playback_dir/video.thuaipb + mv -f temp.lock $playback_dir/playback.thuaipb kill -9 $server_pid finish_payload='{"result": {"status": "Crashed", "scores": [0, 0]}}' curl $FINISH_URL -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -d "${finish_payload}" > $playback_dir/send.log 2>&1