Skip to content
Merged
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 = 'PythonBundle'

name = 'ONNX-Runtime'
version = '1.23.2'
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': '2024a'}

dependencies = [
('CUDA', '12.6.0', '', SYSTEM),
('Python', '3.12.3'),
('ONNX', '1.20.0'),
('flatbuffers-python', '24.3.25'),
('sympy', '1.13.3'),
]

exts_list = [
('humanfriendly', '10.0', {
'checksums': ['6b0b831ce8f15f7300721aa49829fc4e83921a9a301cc7f606be6686a2288ddc'],
}),
('coloredlogs', '15.0.1', {
'checksums': ['7c991aa71a4577af2f82600d8f8f3a89f936baeaf9b50a9c197da014e5bf16b0'],
}),
(name, version, {
'modulename': 'onnxruntime',
'source_urls': ['http://pypi.python.org/packages/source/o/onnxruntime-gpu'],
'sources': ['onnxruntime_gpu-%(version)s-cp312-cp312-manylinux_2_27_%(arch)s.manylinux_2_28_%(arch)s.whl'],
'checksums': ['4f2d1f720685d729b5258ec1b36dee1de381b8898189908c98cbeecdb2f2b5c2'],
}),
]

# 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,
]

_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'