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

CUDA SDK in host_injections cannot be installed by root #438

Open
casparvl opened this issue Dec 22, 2023 · 1 comment
Open

CUDA SDK in host_injections cannot be installed by root #438

casparvl opened this issue Dec 22, 2023 · 1 comment
Labels
accel:nvidia bug Something isn't working

Comments

@casparvl
Copy link
Collaborator

casparvl commented Dec 22, 2023

Running the install_cuda_host_injections.sh as root doesn't work, since EasyBuild doesn't allow it:

{EESSI 2023.06}                                                                                                                                                                                                        
15:03 login-gpu1.liza.surf.nl:/tmp                                                                                                                                                                                     
root# /cvmfs/software.eessi.io/versions/${EESSI_VERSION}/scripts/gpu_support/nvidia/install_cuda_host_injections.sh -c 12.3.0 --accept-cuda-eula 
Attempting to load an EasyBuild module to do actual install                                                                                                                                                            
Traceback (most recent call last):                                                                         
  File "<frozen runpy>", line 198, in _run_module_as_main                                                 
  File "<frozen runpy>", line 88, in _run_code                                                             
  File "/cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/intel/skylake_avx512/software/EasyBuild/4.8.2/lib/python3.11/site-packages/easybuild/main.py", line 755, in <module>
    init_session_state, eb_go, cfg_settings = prepare_main()                                                                                                                                                           
                                              ^^^^^^^^^^^^^^                                                                                                                                                           
  File "/cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/intel/skylake_avx512/software/EasyBuild/4.8.2/lib/python3.11/site-packages/easybuild/main.py", line 749, in prepare_main
    eb_go, cfg_settings = set_up_configuration(args=args, logfile=logfile, testing=testing)                                                                                                                            
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                            
  File "/cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/intel/skylake_avx512/software/EasyBuild/4.8.2/lib/python3.11/site-packages/easybuild/tools/options.py", line 1566, in set_up_configuration
    check_root_usage(allow_use_as_root=options.allow_use_as_root_and_accept_consequences)                                                                                                                              
  File "/cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/intel/skylake_avx512/software/EasyBuild/4.8.2/lib/python3.11/site-packages/easybuild/tools/options.py", line 1518, in check_root_usage
    raise EasyBuildError("You seem to be running EasyBuild with root privileges which is not wise, "                                                                                                                   
easybuild.tools.build_log.EasyBuildError: "You seem to be running EasyBuild with root privileges which is not wise, so let's end this here."                                                                           
Traceback (most recent call last):                                                                                                                                                                                     
  File "<frozen runpy>", line 198, in _run_module_as_main                                                                                                                                                              
  File "<frozen runpy>", line 88, in _run_code                                                             
  File "/cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/intel/skylake_avx512/software/EasyBuild/4.8.2/lib/python3.11/site-packages/easybuild/main.py", line 755, in <module>
    init_session_state, eb_go, cfg_settings = prepare_main()                                               
                                              ^^^^^^^^^^^^^^                                               
  File "/cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/intel/skylake_avx512/software/EasyBuild/4.8.2/lib/python3.11/site-packages/easybuild/main.py", line 749, in prepare_main
    eb_go, cfg_settings = set_up_configuration(args=args, logfile=logfile, testing=testing)                
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                
  File "/cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/intel/skylake_avx512/software/EasyBuild/4.8.2/lib/python3.11/site-packages/easybuild/tools/options.py", line 1566, in set_up_configuration
    check_root_usage(allow_use_as_root=options.allow_use_as_root_and_accept_consequences)                  
  File "/cvmfs/software.eessi.io/versions/2023.06/software/linux/x86_64/intel/skylake_avx512/software/EasyBuild/4.8.2/lib/python3.11/site-packages/easybuild/tools/options.py", line 1518, in check_root_usage
    raise EasyBuildError("You seem to be running EasyBuild with root privileges which is not wise, "                                                                                                                   
easybuild.tools.build_log.EasyBuildError: "You seem to be running EasyBuild with root privileges which is not wise, so let's end this here."
ERROR: The easyconfig CUDA-12.3.0.eb was not found in EasyBuild version:                                   
  This is EasyBuild 4.8.2 (framework: 4.8.2, easyblocks: 4.8.2) on host login-gpu1.liza.surf.nl.           
You either need to give a different version of CUDA to install _or_                                        
use a different version of EasyBuild for the installation.                                                 
                                                                                                           
The versions of available with the current eb command are:

Since this script is actually not unlikely to be run as root, maybe we should add the possibility of passing an --as-root argument, that then sets the --allow-use-as-root-and-accept-consequences argument to EasyBuild?

@boegel
Copy link
Contributor

boegel commented Dec 22, 2023

I'm in favor of detecting early on that the script is being run as root, and flat out refuse to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accel:nvidia bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants