Skip to content
Snippets Groups Projects
Commit d516d1d3 authored by Adrian Ciu's avatar Adrian Ciu
Browse files

esd-spack-installation: added spack install packages method

parent b18e16ba
No related branches found
No related tags found
1 merge request!4feat(spack_operation): implement setup_spack_env functionality
Pipeline #58862 failed with stages
in 8 minutes and 49 seconds
...@@ -167,6 +167,16 @@ class SpackManager(ABC): ...@@ -167,6 +167,16 @@ class SpackManager(ABC):
return spack_version.stdout.strip().split()[0] return spack_version.stdout.strip().split()[0]
return None return None
@no_spack_env
def install_packages(self, jobs: int):
# spack install -v --j "$cpu_count" --fresh
run_command("bash", "-c",
f'source {self.spack_setup_script} && spack install --env {self.env.env_name} -v --j {jobs} --fresh',
capture_output=True, text=True, check=True,
logger=self.logger,
debug_msg=f"Installing spack packages for {self.env.env_name}",
exception_msg=f"Error installing spack packages for {self.env.env_name}",
exception=SpackInstallPackagesException)
def install_spack(self, spack_version="v0.21.1", spack_repo='https://github.com/spack/spack'): def install_spack(self, spack_version="v0.21.1", spack_repo='https://github.com/spack/spack'):
try: try:
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment