Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{2023.06}[foss/2023a] CUDA 12.1.1 (rebuild) + limit CUDA hook to EESSI installs only, and remove duplication when creating symlinks #735

Merged
merged 13 commits into from
Sep 25, 2024
Merged
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 2024.09.18
# We need to reinstall CUDA in the accelerator prefixes
# See https://github.com/EESSI/software-layer/pull/720
easyconfigs:
- CUDA-12.1.1.eb:
options:
accept-eula-for: CUDA
6 changes: 5 additions & 1 deletion eb_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,8 @@ def post_sanitycheck_cuda(self, *args, **kwargs):
Remove files from CUDA installation that we are not allowed to ship,
and replace them with a symlink to a corresponding installation under host_injections.
"""
if self.name == 'CUDA':
# Make sure we only do this for CUDA and only if we are doing a CVMFS installation
if self.name == 'CUDA' and self.installdir.startswith('/cvmfs/software.eessi.io/versions'):
ocaisa marked this conversation as resolved.
Show resolved Hide resolved
print_msg("Replacing files in CUDA installation that we can not ship with symlinks to host_injections...")

# read CUDA EULA, construct allowlist based on section 2.6 that specifies list of files that can be shipped
Expand Down Expand Up @@ -733,6 +734,9 @@ def post_sanitycheck_cuda(self, *args, **kwargs):
basename, full_path)
# if it is not in the allowlist, delete the file and create a symlink to host_injections
host_inj_path = full_path.replace('versions', 'host_injections')
# CUDA itself doesn't care about compute capability so remove this duplication from
# under host_injections
host_inj_path = re.sub(r"accel/nvidia/cc\d+/", '', host_inj_path)
ocaisa marked this conversation as resolved.
Show resolved Hide resolved
# make sure source and target of symlink are not the same
if full_path == host_inj_path:
raise EasyBuildError("Source (%s) and target (%s) are the same location, are you sure you "
Expand Down