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

Quote mount paths to allow presence of whitespace #670

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions amlb/runners/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def _script(self):
return os.path.join(self._framework_dir, _setup_dir_, "Dockerfile")

def _start_container(self, script_params=""):
"""Implementes the container run method"""
"""Invokes the container run method"""
in_dir = rconfig().input_dir
out_dir = rconfig().output_dir
custom_dir = rconfig().user_dir
Expand All @@ -60,7 +60,7 @@ def _start_container(self, script_params=""):
inst_name = f"{self.sid}.{str_sanitize(str_digest(script_params))}"
cmd = (
"docker run --name {name} {options} {run_as} "
"-v {input}:/input -v {output}:/output -v {custom}:/custom "
"-v '{input}':/input -v '{output}':/output -v '{custom}':/custom "
"--rm {image} {params} -i /input -o /output -u /custom -s skip -Xrun_mode=docker {extra_params}"
).format(
name=inst_name,
Expand Down
4 changes: 2 additions & 2 deletions amlb/runners/singularity.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def _script(self):
return os.path.join(self._framework_dir, _setup_dir_, "Singularityfile")

def _start_container(self, script_params=""):
"""Implementes the container run method"""
"""Invokes the container run method"""
in_dir = rconfig().input_dir
out_dir = rconfig().output_dir
custom_dir = rconfig().user_dir
Expand All @@ -77,7 +77,7 @@ def _start_container(self, script_params=""):
script_extra_params = "--session=" # in combination with `self.output_dirs.session` usage below to prevent creation of 2 sessions locally
cmd = (
"singularity run --pwd /bench {options} "
"-B {input}:/input -B {output}:/output -B {custom}:/custom "
"-B '{input}':/input -B '{output}':/output -B '{custom}':/custom "
'{image} "{params} -i /input -o /output -u /custom -s skip -Xrun_mode=singularity {extra_params}"'
).format(
options=rconfig().singularity.run_extra_options,
Expand Down
Loading