Browse Source

first commit

MaochengHu 3 years ago
parent
commit
6e7f8e3a30
1 changed files with 17 additions and 3 deletions
  1. 17 3
      install_torchserver.sh

+ 17 - 3
install_torchserver.sh

@@ -1,7 +1,19 @@
 #!/bin/sh
-git clone https://github.com/pytorch/serve.git
-cd serve/docker &&
+{
+  git clone https://github.com/pytorch/serve.git
+  # if git clone takes to long time, you should change hosts, follow below steps with root authority:
+  # 1. vim etc/hosts
+  # 2. add:
+  # https://github.com 20.205.243.166
+  # https://github.global.ssl.fastly.Net  128.242.245.253
+  # last line
+  echo "git clone https://github.com/pytorch/serve.git successfully 😊😊😊"
+} || {
+  echo "git clone https://github.com/pytorch/serve.git failed 🤢🤢🤢"
+}
 
+cd serve/docker &&
+echo "cd server/docker..."  &&
 # -h, --help	Show script help
 # -b, --branch_name	Specify a branch name to use. Default: master
 # -g, --gpu	Build image with GPU based ubuntu base image
@@ -9,4 +21,6 @@ cd serve/docker &&
 # -t, --tag	Tag name for image. If not specified, script uses torchserve default tag names.
 # -cv, --cudaversion	Specify to cuda version to use. Supported values cu92, cu101, cu102, cu111, cu113. Default cu102
 # --codebuild	Set if you need AWS CodeBuild(https://aws.amazon.com/cn/codebuild/)
-./build_image.sh -g -cv cu111 -t torchserve:1.0 -bt production -b master
+echo "./build_image.sh -g -cv cu111 -t torchserve:1.0 -bt production -b master ..." &&
+./build_image.sh -g -cv cu111 -t torchserve:1.0 -bt production -b master &&
+echo "install torcher_server docker finally ~"