1 Star 0 Fork 6

garrett.pan/sample-videoanalysisperson

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
run_present_server.sh 1.95 KB
一键复制 编辑 原始数据 按行查看 历史
ly 提交于 2019-11-06 14:53 . last
#!/bin/bash
app_path="$( cd "$(dirname "$0")" ; pwd -P )"
app_name="video_analysis_person"
. ${app_path}/script/func_util.sh
function main()
{
stop_pid=`ps -ef | grep "presenter_server\.py" | grep "${app_name}" | awk -F ' ' '{print $2}'`
if [[ ${stop_pid}"X" != "X" ]];then
echo -e "\033[33mNow do presenter server configuration, kill existing presenter process: kill -9 ${stop_pid}.\033[0m"
kill -9 ${stop_pid}
fi
check_python3_lib
if [ $? -ne 0 ];then
return 1
fi
#get and check format of remost_host ip
check_remote_host
if [ $? -ne 0 ];then
return 1
fi
parse_presenter_altasdk_ip ${remote_host}
parse_presenter_view_ip
#1.检查完毕ip之后,将ip的数值复制到config.config
echo "Use ${presenter_atlasdk_ip} to connect to Atlas DK Developerment Board..."
sed -i "s/presenter_server_ip=[0-9.]*/presenter_server_ip=${presenter_atlasdk_ip}/g" ${app_path}/presenterserver/video_analysis/config/config.conf
echo "Use ${presenter_view_ip} to show information in browser..."
sed -i "s/web_server_ip=[0-9.]*/web_server_ip=${presenter_view_ip}/g" ${app_path}/presenterserver/video_analysis/config/config.conf
while [ ${presenter_server_storage_path}"X" == "X" ]
do
read -p "Please input a absolute path to storage video analysis data:" presenter_server_storage_path
mkdir -p ${presenter_server_storage_path}
if [ $? -ne 0 ];then
echo "ERROR: invalid path: ${prepare_presenter_server}, please input a valid path."
fi
done
echo "Use ${presenter_server_storage_path} to video analysis recognition data..."
sed -i "s#^storage_dir=.*\$#storage_dir=${presenter_server_storage_path}#g" ${app_path}/presenterserver/video_analysis/config/config.conf
echo "Finish to prepare ${app_name} presenter server ip configuration."
python3 ${app_path}/presenterserver/presenter_server.py --app ${app_name} &
return 0
}
main
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/garrettpan/sample-videoanalysisperson.git
[email protected]:garrettpan/sample-videoanalysisperson.git
garrettpan
sample-videoanalysisperson
sample-videoanalysisperson
1.3x.0.0

搜索帮助