Skip to content

Prepend container launcher script to pbs command, if it exists#607

Merged
jo-basevi merged 3 commits intopayu-org:masterfrom
ACCESS-NRI:17-support-container-launcher-script-env
Jul 21, 2025
Merged

Prepend container launcher script to pbs command, if it exists#607
jo-basevi merged 3 commits intopayu-org:masterfrom
ACCESS-NRI:17-support-container-launcher-script-env

Conversation

@jo-basevi
Copy link
Copy Markdown
Collaborator

@jo-basevi jo-basevi commented Jul 21, 2025

Related to ACCESS-NRI/model-release-condaenv#17 which requires running payu from an environment within a singularity container.
This allows a custom launcher script to run at the start of the PBS job which launches a singularity container with a SquashFS overlay for the environment, and then runs the python and payu executable within that environment.

Could use a shorter or other name than ENV_LAUNCHER_SCRIPT_PATH? Now would be the time to change it if so..

I've manually tested that this does not add ENV_LAUNCHER_SCRIPT_PATH if it isn't set in the environment, and if it is, it then works with an launcher script implementation in the ACCESS-NRI/model-release-condaenv#19 PR.

Note: qsub call looks like qsub <qsub_flags> -- /path/to/env-launcher-scripts/bin/launcher.sh /path/to/envs/payu/bin/python3.10 /path/to/envs/payu/bin/payu-run where /path/to/envs/payu/bin directory is only accessible when running within the singularity container.

@coveralls
Copy link
Copy Markdown

coveralls commented Jul 21, 2025

Coverage Status

coverage: 59.19% (+0.3%) from 58.881%
when pulling 13f30fe on ACCESS-NRI:17-support-container-launcher-script-env
into 0f45a7d on payu-org:master.

@jo-basevi jo-basevi requested a review from aidanheerdegen July 21, 2025 03:02
Comment thread payu/schedulers/pbs.py Outdated
@jo-basevi jo-basevi requested a review from aidanheerdegen July 21, 2025 05:15
aidanheerdegen
aidanheerdegen previously approved these changes Jul 21, 2025
Copy link
Copy Markdown
Collaborator

@aidanheerdegen aidanheerdegen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks.

I think you'd said you might add a test, but I'll leave that up to your discretion.

@jo-basevi jo-basevi mentioned this pull request Jul 21, 2025
Copy link
Copy Markdown
Collaborator

@aidanheerdegen aidanheerdegen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome. Thanks!

@jo-basevi jo-basevi merged commit 11036b3 into payu-org:master Jul 21, 2025
8 checks passed
minghangli-uni pushed a commit to ACCESS-NRI/payu that referenced this pull request Aug 7, 2025
…org#607)

This is support singularity containers that set `ENV_LAUNCHER_SCRIPT_PATH` environment variable in a script that starts a container and then runs the command arguments inside the container.
@jo-basevi jo-basevi deleted the 17-support-container-launcher-script-env branch August 13, 2025 01:02
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

Successfully merging this pull request may close these issues.

3 participants