1#!/bin/bash 2 3set -ex 4 5# realpath might not be available on MacOS 6script_path=$(python -c "import os; import sys; print(os.path.realpath(sys.argv[1]))" "${BASH_SOURCE[0]}") 7top_dir=$(dirname $(dirname $(dirname "$script_path"))) 8tp2_dir="$top_dir/third_party" 9 10pip install ninja 11 12# Install onnx 13pip install --no-use-pep517 -e "$tp2_dir/onnx" 14 15# Install caffe2 and pytorch 16pip install -r "$top_dir/caffe2/requirements.txt" 17pip install -r "$top_dir/requirements.txt" 18python setup.py develop 19