Set ENV_LAUNCHER_SCRIPT_PATH and only expose payu commands#19
Closed
Set ENV_LAUNCHER_SCRIPT_PATH and only expose payu commands#19
Conversation
This means once launcher.sh is run or within container, it is possible to find the path for the launcher script. This is useful for payu, so it can pass the launcher script along to PBS jobs
- Add launcher_commands array to environments config.sh. If empty, all executables in the conda bin directory will be added as launcher scripts during build - Add new modulefile that only adds the launcher scripts to the PATH and removes all conda environment values.
Collaborator
Author
|
Just realised I was only testing pip installed versions of payu, which has the python shebang header modified to point to the environment python (in the |
This was referenced Jul 21, 2025
Merged
Collaborator
Author
|
Closing this PR as it's superseded by #32 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR:
launcher.shand within the singularity container, it is possible to find out how to launch the container again. This is useful for payu, so it can pass the launcher script along to the PBS jobs. This was tested with a payu branch that adds the launcher script environment variable to the PBS commands, so it looks likeqsub <qsub-flags> -- /path/to/launcher.sh /path/to/squashfs-payu-env/bin/python /path/to/squashfs-payu-env/bin/payu-run. This removes the hack of modifying the payu python headers to point to the python launcher script.Pros of restricting commands to only
payuand removing any conda environment variables (so environment is not activated):conda/analysis3-25.04), provided both modules are loaded before running any scripts/commands. This still means it wouldn't be possible to run the conda/analysis3 environment executables in userscripts in payu as the squahfs environment overlays are needed when the container in launched on the PBS node. But it'll be possible load conda/analysis3 or another conda environment on login nodes and submit payu jobs via the command line.Cons: