Skip to content
Merged
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
easyblock = 'PythonPackage'

name = 'ONNX-Runtime'
version = '1.10.0'
versionsuffix = '-CUDA-%(cudaver)s'

homepage = 'https://onnxruntime.ai/'
description = """ONNX Runtime inference can enable faster customer experiences and lower costs,
supporting models from deep learning frameworks such as PyTorch and
TensorFlow/Keras as well as classical machine learning libraries such as
scikit-learn, LightGBM, XGBoost, etc. ONNX Runtime is compatible with different
hardware, drivers, and operating systems, and provides optimal performance by
leveraging hardware accelerators where applicable alongside graph optimizations
and transforms."""

toolchain = {'name': 'foss', 'version': '2021a'}

# ONNX Runtime with support for GPUs is distributed under the name 'onnxruntime-gpu' in PyPI
source_urls = ['http://pypi.python.org/packages/source/o/onnxruntime-gpu']
local_whl_tmpl = 'onnxruntime_gpu-%%(version)s-cp39-cp39-manylinux_2_17_%s.manylinux2014_%s.whl'
sources = [local_whl_tmpl % ('%(arch)s', '%(arch)s')]
checksums = [
{
local_whl_tmpl % ('x86_64', 'x86_64'):
'2ffe8009eef07307a836e654a8449c177c0ef84ef29c4619d464d5ad8ab2d01b',
}
]

dependencies = [
('CUDA', '11.3.1', '', True),
('Python', '3.9.5'),
('ONNX', '1.11.0'),
('flatbuffers-python', '2.0'),
]

use_pip = True
download_dep_fail = True

# Due to its name 'onnxruntime-gpu', this package does not fullfil requirements on 'onnxruntime' although it provides
# the 'onnxruntime' python module. Fix this dependency issue in pip by creating a stub 'onnxruntime' dist-info folder
_py_sitepkgs = '%(installdir)s/lib/python%(pyshortver)s/site-packages'
postinstallcmds = [
"cp -r %s/onnxruntime{_gpu,}-%%(version)s.dist-info" % _py_sitepkgs,
"sed -i 's/onnxruntime.gpu/onnxruntime/g' %s/onnxruntime-%%(version)s.dist-info/{METADATA,RECORD}" % _py_sitepkgs,
]

sanity_pip_check = True

_py_sitepkgs_dirs = ['onnxruntime', 'onnxruntime-%(version)s.dist-info', 'onnxruntime_gpu-%(version)s.dist-info']

sanity_check_paths = {
'files': [],
'dirs': ['lib/python%%(pyshortver)s/site-packages/%s' % x for x in _py_sitepkgs_dirs],
}

options = {'modulename': 'onnxruntime'}

moduleclass = 'devel'
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
easyblock = 'PythonPackage'

name = 'ONNX-Runtime'
version = '1.10.0'

homepage = 'https://onnxruntime.ai/'
description = """ONNX Runtime inference can enable faster customer experiences and lower costs,
supporting models from deep learning frameworks such as PyTorch and
TensorFlow/Keras as well as classical machine learning libraries such as
scikit-learn, LightGBM, XGBoost, etc. ONNX Runtime is compatible with different
hardware, drivers, and operating systems, and provides optimal performance by
leveraging hardware accelerators where applicable alongside graph optimizations
and transforms."""

toolchain = {'name': 'foss', 'version': '2021a'}

source_urls = ['http://pypi.python.org/packages/source/o/onnxruntime']
local_whl_tmpl = 'onnxruntime-%%(version)s-cp39-cp39-manylinux_2_17_%s.manylinux2014_%s.whl'
sources = [local_whl_tmpl % ('%(arch)s', '%(arch)s')]
checksums = [
{
local_whl_tmpl % ('x86_64', 'x86_64'):
'34cfb07a8af91b3b7f82ad9db8f6dce67f0bd672cdaf659d0fd86aaba7a021d9',
local_whl_tmpl % ('aarch64', 'aarch64'):
'd5b0d3cf319c038b9f4479235dcf842d959f1248be48953f478822ac48a60617',
}
]

dependencies = [
('Python', '3.9.5'),
('ONNX', '1.11.0'),
('flatbuffers-python', '2.0'),
]

use_pip = True
download_dep_fail = True

sanity_pip_check = True

options = {'modulename': 'onnxruntime'}

moduleclass = 'devel'
49 changes: 49 additions & 0 deletions easybuild/easyconfigs/o/ONNX/ONNX-1.11.0-foss-2021a.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
easyblock = 'PythonPackage'

name = 'ONNX'
version = '1.11.0'

homepage = 'https://onnx.ai/'
description = """
Open Neural Network Exchange (ONNX) is an open ecosystem that empowers AI
developers to choose the right tools as their project evolves. ONNX provides an
open source format for AI models, both deep learning and traditional ML. It
defines an extensible computation graph model, as well as definitions of
built-in operators and standard data types. Currently we focus on the
capabilities needed for inferencing (scoring)."""

toolchain = {'name': 'foss', 'version': '2021a'}

sources = [SOURCELOWER_TAR_GZ]
checksums = ['eca224c7c2c8ee4072a0743e4898a84a9bdf8297b5e5910a2632e4c4182ffb2a']

builddependencies = [
('CMake', '3.20.1'),
]

dependencies = [
('Python', '3.9.5'),
('SciPy-bundle', '2021.05'),
('protobuf-python', '3.17.3'),
('typing-extensions', '3.10.0.0'),
]

use_pip = True
download_dep_fail = True

preinstallopts = 'env MAX_JOBS="%(parallel)s"'

sanity_check_paths = {
'files': ['bin/check-model', 'bin/check-node', 'bin/backend-test-tools'],
'dirs': ['lib/python%(pyshortver)s/site-packages'],
}

sanity_check_commands = [
('check-model', '-h'),
('check-node', '-h'),
('backend-test-tools', '-h'),
]

sanity_pip_check = True

moduleclass = 'devel'