aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/load_model.sh
diff options
context:
space:
mode:
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