TorchServe QuickStart 筆記
TorchServe QuickStart 筆記 Environment OS: MacOS Python Version: 3.9 首先用 pyenv virtualenv 建立 TorchServe 的環境: pyenv virtualenv 3.9.16 torchserve pyenv shell torchserve 把 TorchServe 的 repository 抓下來: git clone https://github.com/pytorch/serve.git cd serve Install Dependencies 安裝 dependencies python ./ts_scripts/install_dependencies.py 可以看到這個 script 中主要是安裝 Python 以外的 dependencies serve/ts_scripts/install_dependencies.py class Darwin(Common): def __init__(self): super().__init__() def install_java(self): if os.system("javac -version") != 0 or args.force: out = get_brew_version() if out == "N/A": sys.exit("**Error: Homebrew not installed...") os.system("brew install openjdk@17") def install_nodejs(self): os.system("brew unlink node") os.system("brew install node@14") os.system("brew link --overwrite node@14") def install_node_packages(self): os.system(f"{self.sudo_cmd} ./ts_scripts/mac_npm_deps") def install_wget(self): if os.system("wget --version") != 0 or args.force: os.system("brew install wget") def install_numactl(self): if os.system("numactl --show") != 0 or args.force: os.system("brew install numactl") 透過 pip 安裝 TorchServe ...