diff options
author | Robert Pavel <rspavel@lanl.gov> | 2020-09-14 14:25:49 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-14 14:25:49 -0600 |
commit | a2673aeddd6109ca23c6b65e405d02aa4cbef639 (patch) | |
tree | b75df658c8aabc5c409d8a22ef3c68bb55d6f4e2 | |
parent | 49512e21ab978872f5b7412c20afa139230ffbc5 (diff) | |
download | spack-a2673aeddd6109ca23c6b65e405d02aa4cbef639.tar.gz spack-a2673aeddd6109ca23c6b65e405d02aa4cbef639.tar.bz2 spack-a2673aeddd6109ca23c6b65e405d02aa4cbef639.tar.xz spack-a2673aeddd6109ca23c6b65e405d02aa4cbef639.zip |
CRADL Machine Learning Proxy Spackage (#18668)
* Initial CRADL Spackage Work
Currently resolving ```--single-version-externally-managed``` error
* Fixed GPUtil Issues
Thanks to Vinay Ramakrishnaiah for overwriting install
* Finished CRADL Install Function
Finished CRADL install function which is basically copying the scripts
to the install directory. Also resolved flake8 issues for PR purposes
-rw-r--r-- | var/spack/repos/builtin/packages/cradl/package.py | 30 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/py-apex/package.py | 18 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/py-gputil/package.py | 24 |
3 files changed, 72 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/cradl/package.py b/var/spack/repos/builtin/packages/cradl/package.py new file mode 100644 index 0000000000..59868e5230 --- /dev/null +++ b/var/spack/repos/builtin/packages/cradl/package.py @@ -0,0 +1,30 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Cradl(Package): + """The CRADL proxy application captured performance metrics during + inference on data from multiphysics codes, specifically ALE + hydrodynamics codes.""" + + homepage = "https://github.com/LLNL/CRADL" + url = "https://github.com/LLNL/CRADL/archive/master.zip" + git = "https://github.com/LLNL/CRADL.git" + + version('master', branch='master') + + depends_on('py-pandas') + depends_on('py-torch') + depends_on('py-torchvision') + depends_on('py-apex') + depends_on('py-gputil') + depends_on('py-matplotlib') + depends_on('py-mpi4py') + + def install(self, spec, prefix): + # Mostly about providing an environment so just copy everything + install_tree('.', prefix) diff --git a/var/spack/repos/builtin/packages/py-apex/package.py b/var/spack/repos/builtin/packages/py-apex/package.py new file mode 100644 index 0000000000..0132a01c4d --- /dev/null +++ b/var/spack/repos/builtin/packages/py-apex/package.py @@ -0,0 +1,18 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyApex(PythonPackage): + """apex: Pyramid toolkit to add Velruse, Flash Messages,CSRF, + ReCaptcha and Sessions.""" + + homepage = "https://pypi.org/project/apex/" + url = "https://pypi.io/packages/source/a/apex/apex-0.9.10dev.tar.gz" + + version('0.9.10dev', sha256='48aa6d9e805e661e609161bd52e0d02d89a9a32f32dc29cde6c950df58129119') + + depends_on('py-setuptools', type='build') diff --git a/var/spack/repos/builtin/packages/py-gputil/package.py b/var/spack/repos/builtin/packages/py-gputil/package.py new file mode 100644 index 0000000000..22a16dda7b --- /dev/null +++ b/var/spack/repos/builtin/packages/py-gputil/package.py @@ -0,0 +1,24 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class PyGputil(PythonPackage): + """GPUtil is a Python module for getting the GPU status from NVIDA GPUs + using nvidia-smi.""" + + homepage = "https://github.com/anderskm/gputil" + url = "https://pypi.io/packages/source/G/GPUtil/GPUtil-1.4.0.tar.gz" + + version('1.4.0', sha256='099e52c65e512cdfa8c8763fca67f5a5c2afb63469602d5dcb4d296b3661efb9') + + depends_on('py-setuptools', type='build') + depends_on('py-wheel', type='build') + + def install(self, spec, prefix): + # Override install to avoid + # error: option --single-version-externally-managed not recognized + setup_py('install', '--root=/', '--prefix={0}'.format(prefix)) |