#!/bin/sh { git clone https://github.com/pytorch/serve.git # if git clone takes to long time, you should change etc/hosts refer to https://blog.csdn.net/qq_47911262/article/details/121918174: } || { echo "git clone https://github.com/pytorch/serve.git failed 🤢🤢🤢" } echo "git clone https://github.com/pytorch/serve.git successfully 😊😊😊" 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 # -bt, --buildtype Which type of docker image to build. Can be one of : production(default), dev, codebuild # -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/) echo "./build_image.sh -g -cv cu111 -t torchserve:cuda11-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 ~" && pip3 install torchserve -i https://pypi.tuna.tsinghua.edu.cn/simple && pip3 install torch-model-archiver -i https://pypi.tuna.tsinghua.edu.cn/simple && pip3 install torch-workflow-archiver -i https://pypi.tuna.tsinghua.edu.cn/simple && pip3 install chardet -i https://pypi.tuna.tsinghua.edu.cn/simple