Comments (7)
Hi Federico,
Historically, we have been running spack as root, but we understand that may not be the best / recommended way.
I will do some more research internally and come back to you this week.
from hpc-toolkit.
There are two different issues here.
- Spack is not in your path. The intention is for the spack binary to be in your path even when not acting as root. These lines are meant to accomplish this. The problem is that if Spack is installed from one machine and used from a different machine these lines do not run on user login and the spack setup never happens. When setup properly you should be able to use spack as non-root users (just not install new packages). A short term solution is to add a startup script to the machine on which you want to use spack (example):
- type: data
destination: /etc/profile.d/spack.sh
content: |
#!/bin/sh
if [ -f /sw/spack/share/spack/setup-env.sh ]; then
. /sw/spack/share/spack/setup-env.sh
fi
This should allow any user to use installed spack packages
In the near term we can add functionality to the spack-install
module to provide the above runner as an output from the spack-install module. Longer term we would like to have a solution that does not require adding a startup script, but this will take some design and has not yet been committed to.
- General permissions: Currently you must be root to install packages. We may consider adding configurable options to the spack-install module that would allow 1. all users to install packages or 2. allow the user to provide an oslogin user group for users that are allowed to install packages. These options require some design and have not yet been committed to.
from hpc-toolkit.
With #586, the docs have been updated and the near term solution for "Spack not in path" has been implemented on develop. We will leave this issue open until the update has made it into a formal release.
from hpc-toolkit.
Related to this issue, I have observed some time delays between when I deactivate one environment and when I am able to activate the next. They generate filesystem errors for approx. 15 seconds until suddenly I am able to.
(At this point the "openfoam" environment is active)
[ext_tpdownes_google_com@amdv5-login-xvv0qv7o-001 ~]$ spack env deactivate
[ext_tpdownes_google_com@amdv5-login-xvv0qv7o-001 ~]$ spack env activate openfoam2
==> Error: [Errno 13] Permission denied: '/sw/spack/var/spack/environments/openfoam2/.spack-env'
[ext_tpdownes_google_com@amdv5-login-xvv0qv7o-001 ~]$ spack env activate openfoam2
==> Error: [Errno 13] Permission denied: '/sw/spack/var/spack/environments/openfoam2/.spack-env'
[ext_tpdownes_google_com@amdv5-login-xvv0qv7o-001 ~]$ spack env activate openfoam2
==> Error: [Errno 13] Permission denied: '/sw/spack/var/spack/environments/openfoam2/.spack-env'
[ext_tpdownes_google_com@amdv5-login-xvv0qv7o-001 ~]$ spack env activate openfoam2
==> Error: [Errno 13] Permission denied: '/sw/spack/var/spack/environments/openfoam2/.spack-env'
[ext_tpdownes_google_com@amdv5-login-xvv0qv7o-001 ~]$ ls -lh /sw/spack/var/spack/environments/openfoam2
total 80K
-rw-r--r-- 1 root root 75K Oct 6 15:44 spack.lock
-rw-r--r-- 1 root root 455 Oct 6 15:44 spack.yaml
[ext_tpdownes_google_com@amdv5-login-xvv0qv7o-001 ~]$ ls -lha /sw/spack/var/spack/environments/openfoam2
total 92K
drwxr-sr-x 3 root root 4.0K Oct 6 15:44 .
drwxr-sr-x 4 root root 4.0K Oct 6 13:57 ..
drwxr-sr-x 5 root root 4.0K Oct 6 15:44 .spack-env
-rw-r--r-- 1 root root 75K Oct 6 15:44 spack.lock
-rw-r--r-- 1 root root 455 Oct 6 15:44 spack.yaml
[ext_tpdownes_google_com@amdv5-login-xvv0qv7o-001 ~]$ spack env activate openfoam2
(success)
from hpc-toolkit.
Very likely related to my comment and probably to the original issue raised:
Perhaps in particular:
from hpc-toolkit.
If you follow the issue above, it appears to have been resolved on the Spack development branch for inclusion in a tagged release. I have asked whether that will be the next patch release of v0.18 or a not-yet-planned v0.19.
from hpc-toolkit.
The team discussed this issue and we believe that the issue I mention in #539 (comment) is probably unrelated.
We feel that this issue has been resolved in release v1.7.0 through the following changes:
- the addition of a Toolkit runner which sets up
/etc/profile.d
to include a script that sources the Spack initialization script if it is present- See example usage
The primary use of this runner is to enable non-root users to use Spack on a shared filesystem. However, this enables the execution of spack commands by root if you invoke sudo -i spack ...
. Additionally, you can explicitly include the sourcing in custom shell scripts.
from hpc-toolkit.
Related Issues (20)
- Update ml-slurm blueprint to use updated base image for schedmd debian 11 HOT 1
- Unable to dynamically modify the number of nodes in a slurm cluster HOT 2
- Slurm nodes with hybrid controller module unable to configure correctly HOT 2
- error when use packer to build image in ml-slurm HOT 2
- Unable to configure Slurm due to failure to mount filestore HOT 5
- Feature request: support `hashicorp/google` and `hashicorp/google-beta` v5
- private_vpc_connection is not unique per cluster in slurm-sql module HOT 4
- ERROR: failed to sync instances when issuing `scontrol reboot` HOT 4
- Example of startup script with cluster without vm-instance? HOT 2
- Broken link HOT 1
- PMIx MPI support in Slurm HOT 16
- IP space of [gcp project subnet] is exhausted when deploying a GCP Slurm cluster HOT 2
- Packer custom image does not use specified service account email. HOT 3
- Upgrade to Ops Agent fails HOT 6
- HTCondor tutorial: add cloudresourcemanager.googleapis.com to the list of services to enable HOT 8
- Fail to consume shared reservations HOT 4
- No CUDA devices visible with A2 instances HOT 2
- Missing set credentials on fs creation triggered by validator HOT 5
- Rocky image failing due to 404 on lustre-client HOT 5
- Using a newer version of Terraform can lead to controller replacement on reconfigure for Slurm GCP v6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hpc-toolkit.