#!/bin/bash set -e root=$(cd $(dirname ${0})/..; pwd) build=${root}/build tools=${root}/tools third_party=${root}/third_party identifier=onnxmltools repository=https://github.com/onnx/${identifier}.git mkdir -p ${third_party} if [ -d "${third_party}/${identifier}" ]; then git -C "${third_party}/${identifier}" fetch -p --quiet git -C "${third_party}/${identifier}" reset --quiet --hard origin/master else echo "Clone ${repository}..." git -C "${third_party}" clone --recursive ${repository} fi export PYTHONUSERBASE=${build}/third_party/pypi/${identifier} export PATH=$PATH:${PYTHONUSERBASE}/bin rm -rf ${PYTHONUSERBASE} pip install --quiet --user coremltools pip install --quiet --user tensorflow pip install --quiet --user keras pip install --quiet --user ${third_party}/${identifier} python ${tools}/onnx-converter.py $@