Skip to content

Commit

Permalink
Add ai-env virtual package
Browse files Browse the repository at this point in the history
  • Loading branch information
climbfuji committed Mar 5, 2024
1 parent ebb945f commit e89ccb9
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 10 deletions.
28 changes: 28 additions & 0 deletions spack-ext/repos/spack-stack/packages/ai-env/package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright 2013-2022 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 AiEnv(BundlePackage):
"""Development environment for AI/ML applications"""

# DH* TODO UPDATE FROM INTERNAL TO PUBLIC
homepage = "https://github.com/JCSDA/spack-stack"
git = "https://github.comJCSDA/spack-stack.git"

maintainers("climbfuji", "srherbener")

version("1.0.0")

depends_on("jedi-base-env", type="run")
depends_on("py-torch", type="run")

conflicts(
"ewok-env +cylc",
msg="ai-env can not be built together with cylc (py-botocore conflicts)",
)

# There is no need for install() since there is no code.
5 changes: 0 additions & 5 deletions spack-ext/repos/spack-stack/packages/ewok-env/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,4 @@ class EwokEnv(BundlePackage):
depends_on("r2d2", when="+r2d2", type="run")
depends_on("ewok", when="+ewok", type="run")

conflicts(
"%gcc platform=darwin",
msg="ewok-env does " + "not build with gcc on macOS, use apple-clang",
)

# There is no need for install() since there is no code.
9 changes: 4 additions & 5 deletions spack-ext/repos/spack-stack/packages/jedi-base-env/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ class JediBaseEnv(BundlePackage):
variant("fftw", default=True, description="Build fftw")
variant("hdf4", default=True, description="Build hdf4 library and python hdf module")

# Variants for AI packages
variant("py-torch", default=False, description="Enable support for py-torch")

depends_on("base-env", type="run")
depends_on("bison", type="run")
depends_on("blas", type="run")
Expand Down Expand Up @@ -66,7 +63,9 @@ class JediBaseEnv(BundlePackage):
depends_on("py-scipy", type="run")
depends_on("py-xarray", type="run")

# AI packages
depends_on("py-torch", when="+py-torch", type="run")
conflicts(
"%gcc platform=darwin",
msg="jedi-base-env does not build with gcc on macOS, use apple-clang",
)

# There is no need for install() since there is no code.

0 comments on commit e89ccb9

Please sign in to comment.