Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions payu/schedulers/pbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

# Standard library
import os
from pathlib import Path
import re
import sys
import shlex
Expand Down Expand Up @@ -129,6 +130,13 @@ def submit(self, pbs_script, pbs_config, pbs_vars=None, python_exe=None):
envmod.setup()
envmod.module('load', 'pbs')

# Check for custom container launcher script environment variable
launcher_script = os.environ.get('ENV_LAUNCHER_SCRIPT_PATH')
if launcher_script and Path(launcher_script).is_file():
Comment thread
aidanheerdegen marked this conversation as resolved.
Outdated
# Prepend the container launcher script to the python command
# so the python executable is accessible in the container
python_exe = f'{launcher_script} {python_exe}'

# Construct job submission command
cmd = 'qsub {flags} -- {python} {script}'.format(
flags=' '.join(pbs_flags),
Expand Down
Loading