-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor CMakeList and download scripts to use versions from a single…
… source (#767)
- Loading branch information
1 parent
ad9912b
commit f9c12ca
Showing
8 changed files
with
83 additions
and
73 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,25 @@ | ||
#!/bin/bash | ||
curdir=$pwd | ||
mydir="${0%/*}" | ||
onnxdir=onnx-1.15.0 | ||
protobufdir=protobuf-3.19.2 | ||
version=$1 | ||
protobuf_version=$2 | ||
|
||
# This script downloads the protobuffer file from the Onnx repo. | ||
# There are no C++ bindings for onnx so we compile the protobuffer ourselves. | ||
onnxdir=onnx-$version | ||
protobufdir=protobuf-$protobuf_version | ||
|
||
# This script downloads the protobuffer file from the ONNX repo. | ||
# There are no C++ bindings for ONNX so we compile the protobuffer ourselves. | ||
# see https://stackoverflow.com/questions/67301475/parse-an-onnx-model-using-c-extract-layers-input-and-output-shape-from-an-on | ||
# for details. | ||
|
||
cd $mydir | ||
|
||
mkdir -p $onnxdir | ||
cd $onnxdir | ||
echo "downloading onnx proto file" | ||
wget -q https://raw.githubusercontent.com/onnx/onnx/v1.15.0/onnx/onnx.proto3 -O onnx.proto3 | ||
echo "Downloading ONNX proto file" | ||
wget -q https://raw.githubusercontent.com/onnx/onnx/v$version/onnx/onnx.proto3 -O onnx.proto3 | ||
|
||
echo "compiling the onnx proto file" | ||
echo "Compiling the ONNX proto file" | ||
../$protobufdir/installed/bin/protoc --cpp_out=. onnx.proto3 | ||
|
||
cd $curdir |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
#!/bin/bash | ||
curdir=$pwd | ||
mydir="${0%/*}" | ||
version=$1 | ||
|
||
cd $mydir | ||
|
||
# TODO: add progress bar, -q is quite, if removing it the progress bar is in | ||
# multiple lines | ||
echo "downloading pybind" | ||
wget -q -O pybind11_2_10_4.tar.gz https://github.com/pybind/pybind11/archive/v2.10.4.tar.gz | ||
wget -q https://github.com/pybind/pybind11/archive/v$version.tar.gz -O pybind11-$version.tar.gz | ||
|
||
echo "unzipping pybind" | ||
tar xzvf pybind11_2_10_4.tar.gz >> /dev/null | ||
tar xzvf pybind11-$version.tar.gz >> /dev/null | ||
|
||
cd $curdir |