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

Support for users changing sinularity command to add --cleanenv? #1594

Open
ErikOsinga opened this issue Jul 17, 2024 · 3 comments
Open

Support for users changing sinularity command to add --cleanenv? #1594

ErikOsinga opened this issue Jul 17, 2024 · 3 comments

Comments

@ErikOsinga
Copy link

Hi,

I have encountered this weird error trying to use caracal on my local cluster, where the pipeline crashes on whatever is the first step, because of the way the container is created. It gives this vague error
Illegal option --

image

I found this error online https://forum.code-aster.org/public/d/26506-can-t-execute-salome-meca-with-the-singularity-container and apparently it's related to some host environment variables, though I am not sure which ones. In any case, it can be fixed by launching containers with `--cleanenv'.

After some digging around, I found that I could edit caracal_venv/lib64/python3.9/site-packages/stimela/singularity.py and change the line that launches the container to utils.xrun(f"{BINARY} run --cleanenv --workdir {self.execdir} --contain"

However, this is less than ideal. Would it be possible to add a user variable to the caracal command to enable launching the singularity containers with the --cleanenv command?

Perhaps something like

caracal --cleanenv -ct singularity -c strategy.yml

@paoloserra
Copy link
Collaborator

pinging @SpheMakh and @Athanaseus

@Athanaseus
Copy link
Collaborator

Hi @ErikOsinga thank you for reporting this.

Could you also provide the output/logs-20240717-212232/log-caracal.txt to see if it provides further details on the error?

This is more a stimela issue, and relates to ratt-ru/Stimela-classic#598 requesting environmental variables passed on runtime.
I think the currently implemented solution can be set as the default.
@SpheMakh please comment, and we can push the changes.

Regards

@ErikOsinga
Copy link
Author

ErikOsinga commented Jul 18, 2024

Thanks for getting back to me so quickly! The full log-file is attached below.

log-caracal.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants