ygauravyy commited on
Commit
fbe14ac
1 Parent(s): 1d16dee

Upload 2 files

Browse files
Files changed (2) hide show
  1. config.local.properties +9 -0
  2. setup_macos.sh +30 -0
config.local.properties ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ # This source code is licensed under the MIT license found in the
3
+ # LICENSE file in the root directory of this source tree.
4
+
5
+ inference_address=http://0.0.0.0:8080
6
+ management_address=http://0.0.0.0:8081
7
+ metrics_address=http://0.0.0.0:8082
8
+ model_store=./model-store
9
+ load_models=all
setup_macos.sh ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (c) Meta Platforms, Inc. and affiliates.
2
+ # This source code is licensed under the MIT license found in the
3
+ # LICENSE file in the root directory of this source tree.
4
+
5
+ # needed for torchserve
6
+ # if no java..
7
+ if ! command -v java &> /dev/null
8
+ then
9
+ echo "java could not be found, installing"
10
+ brew install java
11
+ sudo ln -sfn /opt/homebrew/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk
12
+ fi
13
+
14
+ echo "*** Installing packages"
15
+ git clone https://github.com/jin-s13/xtcocoapi.git
16
+ cd xtcocoapi
17
+ pip install -r requirements.txt
18
+ python setup.py install
19
+ cd ..
20
+
21
+ pip install -U openmim torch==1.13.0 torchserve mmdet==2.27.0 mmpose==0.29.0 numpy==1.23.3 requests==2.31.0 scipy==1.10.0 tqdm==4.64.1
22
+ mim install mmcv-full==1.7.0
23
+
24
+ echo "*** Downloading models"
25
+ mkdir -p ./model-store
26
+ wget https://github.com/facebookresearch/AnimatedDrawings/releases/download/v0.0.1/drawn_humanoid_detector.mar -P ./model-store/
27
+ wget https://github.com/facebookresearch/AnimatedDrawings/releases/download/v0.0.1/drawn_humanoid_pose_estimator.mar -P ./model-store/
28
+
29
+ echo "*** Now run torchserve:"
30
+ echo "torchserve --start --ts-config config.local.properties --foreground"