Created
April 3, 2021 11:00
-
-
Save oborchers/7e27033be3c7d53a43064c74c4dc4f1a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get update | |
# Install ONNX ML | |
export ONNX_ML=1 | |
pip install -U onnx | |
# Clone ONNX Runtime and build | |
git clone https://github.com/microsoft/onnxruntime.git --branch v1.7.1 --single-branch | |
/bin/sh onnxruntime/dockerfiles/scripts/install_common_deps.sh | |
cd onnxruntime/ | |
pip install -r requirements-dev.txt | |
/bin/sh ./build.sh \ | |
--config Release \ | |
--update \ | |
--build \ | |
--build_wheel \ | |
--parallel \ | |
--use_cuda \ | |
--cuda_home $CUDA_HOME \ | |
--cudnn_home /usr/lib/x86_64-linux-gnu/ \ | |
--use_tensorrt \ | |
--tensorrt_home /opt/tensorrt/ \ | |
--build_dir /workspace/onnxruntime/python | |
# Requires cmake > 3.17 | |
pip install onnxruntime-tools git+https://github.com/microsoft/ort-customops.git | |
# Make sure some prior package did not accidentally overwrite the GPU install | |
pip uninstall -y onnxruntime && \ | |
pip install -U /workspace/onnxruntime/python/Release/dist/*gpu*.whl | |
echo "ONNX Runtime Execution Providers: " && python -c "import onnxruntime as ort; print(ort.get_available_providers())" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment