forked from spack/spack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
py-earth2mip: add new package (spack#43062)
* py-earth2mip: add new package * Fix audit tests * Make things easier to concretize * Make things easier to concretize * Fix magics build * Fix onnx build * blacken * cmake > py-cmake * Fix onnxruntime build * onnxruntime: remove unknown cmake vars * Trick bazelisk into using Spack bazel * Different deps for main * protobuf: add v3.25.3 * Enforce upper bound on jaxlib version * py-chex: add v0.1.85 * py-dm-haiku: add v0.0.12 * py-jax: add v0.4.25 * Older jaxlib doesn't build on ppc64le either
- Loading branch information
1 parent
18eb5ea
commit 6b525d4
Showing
45 changed files
with
781 additions
and
101 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
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Copyright 2013-2024 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.package import * | ||
|
||
|
||
class PyColabtools(PythonPackage): | ||
"""Tools to work with colab from google.""" | ||
|
||
homepage = "https://github.com/zuuuhkrit/colabtools" | ||
pypi = "colabtools/colabtools-0.0.1.tar.gz" | ||
|
||
license("LGPL-3.0-only") | ||
|
||
version("0.0.1", sha256="b6f7c0050e5924f4ad7e4762d46be663e21d417a39fc4adf6c6c90e8d9be47ec") | ||
|
||
depends_on("py-setuptools", type="build") |
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 |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# Copyright 2013-2024 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.package import * | ||
|
||
|
||
class PyEarth2mip(PythonPackage): | ||
"""Earth-2 Model Intercomparison Project (MIP). | ||
A python framework that enables climate researchers and scientists to explore | ||
and experiment with AI models for weather and climate. | ||
""" | ||
|
||
homepage = "https://github.com/NVIDIA/earth2mip" | ||
url = "https://github.com/NVIDIA/earth2mip/archive/refs/tags/v0.1.0.tar.gz" | ||
git = "https://github.com/NVIDIA/earth2mip.git" | ||
|
||
maintainers("adamjstewart") | ||
|
||
license("Apache-2.0") | ||
|
||
version("main", branch="main") | ||
version("0.1.0", sha256="a49d0607893013783d30bfcb2f80412014ab535fbcc1e96dd139b78819bd98ab") | ||
|
||
variant("pangu", default=False, description="Build dependencies needed for Pangu-Weather") | ||
variant("graphcast", default=False, description="Build dependencies needed for GraphCast") | ||
|
||
with default_args(type="build"): | ||
depends_on("py-setuptools") | ||
depends_on("py-setuptools-scm") | ||
|
||
with default_args(type=("build", "run")): | ||
depends_on("python@3.10:") | ||
depends_on("py-altair@4.2.2:") | ||
depends_on("py-boto3@1.26.0:", when="@main") | ||
depends_on("py-cdsapi@0.6.1:") | ||
depends_on("py-cfgrib@0.9.10.3:") | ||
depends_on("py-cftime") | ||
depends_on("py-dask@2023.1.0:") | ||
depends_on("py-distributed@2023.1.0:") | ||
depends_on("py-eccodes@1.4.0:") | ||
depends_on("py-ecmwflibs@0.5.2:") | ||
depends_on("py-ecmwf-opendata@0.2.0:", when="@main") | ||
depends_on("py-einops") | ||
depends_on("py-fsspec") | ||
depends_on("py-h5py@3.2.0:") | ||
depends_on("py-h5netcdf@1.0.0:") | ||
depends_on("py-importlib-metadata@6.7.0:") | ||
depends_on("py-joblib@1.1.0:") | ||
depends_on("py-loguru@0.6.0:", when="@main") | ||
depends_on("py-netcdf4@1.6.4:") | ||
depends_on("py-numpy") | ||
depends_on("py-nvidia-modulus@0.4.0:") | ||
depends_on("py-pandas@1.5.3:") | ||
depends_on("py-properscoring@0.1:") | ||
depends_on("py-pydantic@1.10:1.10.11") | ||
depends_on("py-pytest-timeout@2.1.0:", when="@main") | ||
depends_on("py-pytest-asyncio@0.21.0:") | ||
depends_on("py-pytest-regtest") | ||
depends_on("py-pytest@7.0.0:") | ||
depends_on("py-python-dotenv@1.0.0:") | ||
depends_on("py-s3fs") | ||
depends_on("py-setuptools@38.4:") | ||
depends_on("py-torch@1.13:") | ||
depends_on("py-torch-harmonics@0.5.0:") | ||
depends_on("py-tqdm@4.65.0:") | ||
depends_on("py-typer") | ||
depends_on("py-xarray") | ||
depends_on("py-xskillscore@0.0.24:") | ||
depends_on("py-zarr@2.14.2:") | ||
|
||
with default_args(type="run"): | ||
with when("+pangu"): | ||
depends_on("py-onnxruntime@1.15.1:") | ||
|
||
with when("+graphcast"): | ||
depends_on("py-flax@0.7.3", when="@main") | ||
depends_on("py-jax@0.4.16") | ||
depends_on("py-graphcast@0.1") | ||
depends_on("py-gcsfs") | ||
depends_on("py-gcsfs@2023.6.0:", when="@0.1.0") |
20 changes: 20 additions & 0 deletions
20
var/spack/repos/builtin/packages/py-ecmwf-opendata/package.py
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Copyright 2013-2024 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.package import * | ||
|
||
|
||
class PyEcmwfOpendata(PythonPackage): | ||
"""A package to download ECMWF open data.""" | ||
|
||
homepage = "https://github.com/ecmwf/ecmwf-opendata" | ||
pypi = "ecmwf-opendata/ecmwf-opendata-0.3.3.tar.gz" | ||
|
||
license("Apache-2.0") | ||
|
||
version("0.3.3", sha256="6f3181c7872b72e5529d2b4b7ec6ff08d37c37beee0a498f7f286410be178c6a") | ||
|
||
depends_on("py-setuptools", type="build") | ||
depends_on("py-multiurl@0.2.1:", type=("build", "run")) |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Copyright 2013-2024 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.package import * | ||
|
||
|
||
class PyEcmwflibs(PythonPackage): | ||
"""A Python package that wraps some of ECMWF libraries to be used by | ||
Python interfaces to ECMWF software. | ||
""" | ||
|
||
homepage = "https://github.com/ecmwf/ecmwflibs" | ||
url = "https://github.com/ecmwf/ecmwflibs/archive/refs/tags/0.6.1.tar.gz" | ||
|
||
license("Apache-2.0") | ||
|
||
version("0.6.1", sha256="9f2153d1b4a07038b975b7d6bb89bbf9e88d6bc4e2ef4d4e067e58a2fb5270d3") | ||
|
||
depends_on("py-setuptools", type="build") | ||
depends_on("py-findlibs", type=("build", "run")) | ||
depends_on("eccodes") | ||
depends_on("magics") | ||
|
||
def patch(self): | ||
# Instruct setup.py where to find dependencies | ||
library_dirs = self.spec["eccodes"].libs.directories + self.spec["magics"].libs.directories | ||
include_dirs = ( | ||
self.spec["eccodes"].headers.directories + self.spec["magics"].headers.directories | ||
) | ||
setup = FileFilter("setup.py") | ||
setup.filter("library_dirs=.*", f"library_dirs={library_dirs},") | ||
setup.filter("include_dirs=.*", f"include_dirs={include_dirs},") |
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
Oops, something went wrong.