Browse Source

Merge pull request #515 from DragonAura/dev

fix: 💩 fix python compile
tags/v0.1.0
Changli Tang GitHub 2 years ago
parent
commit
658ac5c23e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions
  1. +1
    -0
      dependency/Dockerfile/Dockerfile_cpp
  2. +4
    -5
      dependency/shell/run.sh

+ 1
- 0
dependency/Dockerfile/Dockerfile_cpp View File

@@ -4,6 +4,7 @@ MAINTAINER eesast
WORKDIR /usr/local

COPY ./CAPI/cpp /usr/local/PlayerCode/CAPI/cpp
COPY ./CAPI/python /usr/local/PlayerCode/CAPI/python
COPY ./dependency/proto /usr/local/PlayerCode/dependency/proto
COPY ./dependency/shell /usr/local/PlayerCode/dependency/shell
WORKDIR /usr/local/PlayerCode/dependency/proto


+ 4
- 5
dependency/shell/run.sh View File

@@ -53,6 +53,10 @@ if [ -f $playback_dir/start.lock ]; then
sleep 1
ps -p $server_pid > /dev/null 2>&1
done
result=$(cat /usr/local/playback/result.json)
score0=$(echo "$result" | grep -oP '(?<="Student":)\d+')
score1=$(echo "$result" | grep -oP '(?<="Tricker":)\d+')
curl $URL -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -d '{"result":[{"team_id":0, "score":'${score0}'}, {"team_id":1, "score":'${score1}'}], "mode":'${MODE}'}'> $playback_dir/send.log 2>&1
touch $playback_dir/finish.lock
echo "Finish"
else
@@ -62,8 +66,3 @@ else
mv -f temp.lock $playback_dir/video.thuaipb
kill -9 $server_pid
fi

result=$(cat /usr/local/playback/result.json)
score0=$(echo "$result" | grep -oP '(?<="Student":)\d+')
score1=$(echo "$result" | grep -oP '(?<="Tricker":)\d+')
curl $URL -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -d '{"result":[{"team_id":0, "score":'${score0}'}, {"team_id":1, "score":'${score1}'}], "mode":'${MODE}'}'

Loading…
Cancel
Save