Skip to content

Commit

Permalink
installONNX
Browse files Browse the repository at this point in the history
  • Loading branch information
johnhaddon committed Oct 26, 2024
1 parent dca591f commit 68c94e2
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions .github/workflows/main/installONNX.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
##########################################################################
#
# Copyright (c) 2024, Cinesite VFX Ltd. All rights reserved.
Expand Down Expand Up @@ -41,18 +41,15 @@
version = "1.19.2"

if sys.platform == "linux" :

url = f"https://github.com/microsoft/onnxruntime/releases/download/v{version}/onnxruntime-linux-x64-{version}.tgz"
elif sys.platform == "darwin" :
url = f"https://github.com/microsoft/onnxruntime/releases/download/v{version}/onnxruntime-osx-arm64-{version}.tgz"

print( "Downloading ONNX \"{}\"".format( url ) )
archiveFileName, headers = urlretrieve( url )

pathlib.Path( "onnxruntime" ).mkdir()

subprocess.check_call(
[ "tar", "-xf", archiveFileName, "-C", "onnxruntime", "--strip-components=1" ]
)
print( "Downloading ONNX \"{}\"".format( url ) )
archiveFileName, headers = urlretrieve( url )

else :
pathlib.Path( "onnxruntime" ).mkdir()

raise NotImplementedError
subprocess.check_call(
[ "tar", "-xf", archiveFileName, "-C", "onnxruntime", "--strip-components=1" ]
)

0 comments on commit 68c94e2

Please sign in to comment.