summaryrefslogtreecommitdiffstats
path: root/scripts/load_model.sh
diff options
context:
space:
mode:
authorwangy122 <wangy122@chinatelecom.cn>2021-03-05 15:11:17 +0800
committerwangy122 <wangy122@chinatelecom.cn>2021-03-05 15:11:49 +0800
commitf15dc37e62eee9d5d02bf58af1053750a20fad23 (patch)
tree5599e6ab03df27a287fcb799b5a186c40dbaffe6 /scripts/load_model.sh
parentab00dc61c4f1206fbd906251b4c01ede0b89e990 (diff)
feat:add dockerfile
Issue-ID: USECASEUI-525 Signed-off-by: wangy122 <wangy122@chinatelecom.cn> Change-Id: Ifca8abdfff479216bb0ea6b84d2c61fb640039f5
Diffstat (limited to 'scripts/load_model.sh')
-rw-r--r--scripts/load_model.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/load_model.sh b/scripts/load_model.sh
new file mode 100644
index 0000000..1961f6a
--- /dev/null
+++ b/scripts/load_model.sh
@@ -0,0 +1,6 @@
+path=$1
+use_gpu=$2
+export CUDA_VISIBLE_DEVICES=$use_gpu
+netstat -nap | grep 8502 | awk 'NR==1{printf $7}' | sed 's/\([0-9]*\).*/\1/g' | xargs kill -9
+sleep 5
+nohup tensorflow_model_server --port=8500 --rest_api_port=8502 --model_name=predict --model_base_path=$path > server.log 2>&1 & \ No newline at end of file