From a0fe6ab2edd2f881181d1361f5d55f6c1e5c16ff Mon Sep 17 00:00:00 2001 From: Valentin Volkl Date: Thu, 19 May 2022 17:18:18 +0200 Subject: [PATCH] cuda: use stage dir instead of /tmp during install (#29584) --- var/spack/repos/builtin/packages/cuda/package.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/cuda/package.py b/var/spack/repos/builtin/packages/cuda/package.py index e6a1983c66..0458d77599 100644 --- a/var/spack/repos/builtin/packages/cuda/package.py +++ b/var/spack/repos/builtin/packages/cuda/package.py @@ -128,7 +128,7 @@ '6.5.14': { 'Linux-x86_64': ('f3e527f34f317314fe8fcd8c85f10560729069298c0f73105ba89225db69da48', 'https://developer.download.nvidia.com/compute/cuda/6_5/rel/installers/cuda_6.5.14_linux_64.run')}, '6.0.37': { - 'Linux-x86_64': ('991e436c7a6c94ec67cf44204d136adfef87baa3ded270544fa211179779bc40', '//developer.download.nvidia.com/compute/cuda/6_0/rel/installers/cuda_6.0.37_linux_64.run')}, + 'Linux-x86_64': ('991e436c7a6c94ec67cf44204d136adfef87baa3ded270544fa211179779bc40', 'https://developer.download.nvidia.com/compute/cuda/6_0/rel/installers/cuda_6.0.37_linux_64.run')}, } @@ -247,6 +247,11 @@ def install(self, spec, prefix): '--toolkit', # install CUDA Toolkit ] + if spec.satisfies('@7:'): + # use stage dir instead of /tmp + mkdir(join_path(self.stage.path, 'tmp')) + arguments.append('--tmpdir=%s' % join_path(self.stage.path, 'tmp')) + if spec.satisfies('@10.1:'): arguments.append('--installpath=%s' % prefix) # Where to install else: