Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install onnxruntime tests on linux wheel for circle_ci #1950

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions packaging/build_conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,15 @@ setup_conda_pytorch_constraint
setup_conda_cudatoolkit_constraint
setup_visual_studio_constraint
setup_junit_results_folder

# Small workaround to install onnxruntime on the machine.
# just to see if it works before cleanup
if [[ "$(uname)" == Linux ]] ; then
conda create -n build_env python="$PYTHON_VERSION" anaconda -yq
activate build_env
conda install -yq -c anaconda protobuf
conda install -yq -c conda-forge pybind11
"$(conda info --base)/envs/build_env/bin/python" -m pip -q install onnxruntime
fi

conda build $CONDA_CHANNEL_FLAGS -c defaults -c conda-forge --no-anaconda-upload --python "$PYTHON_VERSION" packaging/torchvision
1 change: 1 addition & 0 deletions packaging/build_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ setup_wheel_python
pip_install numpy pyyaml future ninja
setup_pip_pytorch_version
python setup.py clean
install_onnx_runtime_on_linux_wheel
IS_WHEEL=1 python setup.py bdist_wheel
24 changes: 24 additions & 0 deletions packaging/pkg_helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -276,3 +276,27 @@ setup_junit_results_folder() {
export CONDA_PYTORCH_BUILD_RESULTS_DIRECTORY="${SOURCE_ROOT_DIR}/build_results/results.xml"
fi
}

install_onnx_runtime_on_linux_wheel() {
if [[ "$(uname)" == Linux ]] ; then
case "$PYTHON_VERSION" in
# TODO: Enable when onnxruntime is packaged for python 3.8
3.8) ;;
*)
pip_install onnxruntime
;;
esac
fi
}

install_onnx_runtime_on_linux_conda() {
if [[ "$(uname)" == Linux ]] ; then
case "$PYTHON_VERSION" in
# TODO: Enable when onnxruntime is packaged for python 3.8
3.8) ;;
*)
"$(conda info --base)/bin/python" -m pip -q install onnxruntime
;;
esac
fi
}
1 change: 1 addition & 0 deletions third_party/libjpeg-turbo
Submodule libjpeg-turbo added at 166e34