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

Does stimela really need the USER variable? #784

Open
o-smirnov opened this issue Jun 28, 2023 · 5 comments
Open

Does stimela really need the USER variable? #784

o-smirnov opened this issue Jun 28, 2023 · 5 comments
Assignees

Comments

@o-smirnov
Copy link
Collaborator

See caracal-pipeline/stimela#156

@SpheMakh
Copy link
Collaborator

It does when using docker (at least docker that requires root). I'm pushing a commit that uses os.getlogin() per your suggestion. If that doesn't work, then we can just add a conditional before getting the USER.

@SpheMakh
Copy link
Collaborator

Here is the branch apptainer. @NicolaMalavasi, please try it

@NicolaMalavasi
Copy link

NicolaMalavasi commented Jul 4, 2023

Dear all,
thanks for taking the time to review this. A few considerations here below.

  1. I was unfortunately unable to use the new stimela branch. In fact I do not install stimela directly, but I pip install -U caracal==1.0.6 which then installs stimela, per my understanding. I can see if I can modify the commit of stimela used by this installation. For the moment I had to rely on manually changing the line USER = os.environ["USER"] to USER = os.getlogin() in __init__.py of stimela after installation.

  2. This solution does not work either. The error I get is

USER = os.getlogin()
OSError: [Errno 6] No such device or address

and I think I understood that this is because os.getlogin() requires a user to be logged in an active terminal which is not my case (I run caracal from an HTcondor job and my user is nobody during the run.

Thanks for the help

@SpheMakh
Copy link
Collaborator

SpheMakh commented Jul 5, 2023

Hi @NicolaMalavasi, I've updated the branch again. Please re-install the branch and try again.

Install the branch by running this where you have CARACal installed

pip install -U --force-reinstall git+https://github.com/ratt-ru/Stimela@apptainer

@SpheMakh
Copy link
Collaborator

SpheMakh commented Jul 5, 2023

The changes are now in the master branch, the apptainer branch is gone. Install using the below instead

pip install -U --force-reinstall git+https://github.com/ratt-ru/Stimela.git

@SpheMakh SpheMakh reopened this Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants