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

fix(htcondorcern): unpacked images and multiline commands #474

Merged
merged 2 commits into from
Nov 22, 2024
Merged
Changes from all commits
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: 5 additions & 3 deletions reana_job_controller/htcondorcern_job_manager.py
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
import base64
import logging
import os
import shlex
import threading
from shutil import copyfile

@@ -163,7 +164,7 @@ def _format_arguments(self):
# Take only the user's command, removes the change directory to workflow workspace
# added by RWE-Serial/Snakemake since HTCondor implementation does not need it.
# E.g. "cd /path/to/workspace ; user-command" -> "user-command"
base_cmd = " ".join(self.cmd.split()[3:])
base_cmd = self.cmd.split(maxsplit=3)[3]
if self.workflow.type_ == "snakemake":
# For Snakemake workflows, also remove the workspace path from
# `jobfinished` and `jobfailed` touch commands.
@@ -235,9 +236,10 @@ def _copy_wrapper_file(self):
"--bind $PWD:/srv "
"--bind /cvmfs "
"--bind /eos "
"{DOCKER_IMG} {CMD}".format(
"{DOCKER_IMG} "
"bash -c {CMD}".format(
DOCKER_IMG=self.docker_img,
CMD=self._format_arguments() + " | bash",
CMD=shlex.quote(self._format_arguments() + " | bash"),
)
)
f = open("job_singularity_wrapper.sh", "w")
Loading