-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·32 lines (24 loc) · 834 Bytes
/
test.sh
File metadata and controls
executable file
·32 lines (24 loc) · 834 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash
set -euxo pipefail
export CUDA_VISIBLE_DEVICES=0
rm -rf ./models
mkdir -p models/resnet50/1
cp -r ../common/model models/resnet50/1/
# generate minimal config.pbtxt
echo "name: \"resnet50\"" >> models/resnet50/config.pbtxt
echo "backend: \"oneflow\"" >> models/resnet50/config.pbtxt
SERVER=/opt/tritonserver/bin/tritonserver
SERVER_ARGS="--model-repository=`pwd`/models --log-verbose=1 --strict-model-config false"
SERVER_LOG="./inference_server.log"
source ../common/util.sh
run_server
if [ "$SERVER_PID" == "0" ]; then
echo -e "\n***\n*** Failed to start $SERVER\n***"
cat $SERVER_LOG
exit 1
fi
echo "running resnet50 basic test with oneflow lite backend"
python3 ../common/test_model.py --model resnet50 --target-output ../common/resnet50_output.npy
kill $SERVER_PID
wait $SERVER_PID
exit 0