From 8df3c46756a78d91b0d642b5f2370bd15e0c140e Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Mon, 10 Jun 2019 19:10:28 +0200 Subject: [PATCH] Do not hardcode path to bash (#332) --- rl_coach/coach.py | 4 ++-- rl_coach/tests/test_eks.py | 2 +- rl_coach/utils.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rl_coach/coach.py b/rl_coach/coach.py index 56d2b2e..f7242f5 100644 --- a/rl_coach/coach.py +++ b/rl_coach/coach.py @@ -66,8 +66,8 @@ def open_dashboard(experiment_path): dashboard_path = 'python {}/dashboard.py'.format(get_base_dir()) cmd = "{} --experiment_dir {}".format(dashboard_path, experiment_path) screen.log_title("Opening dashboard - experiment path: {}".format(experiment_path)) - # subprocess.Popen(cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, shell=True, executable="/bin/bash") - subprocess.Popen(cmd, shell=True, executable="/bin/bash") + # subprocess.Popen(cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, shell=True, executable="bash") + subprocess.Popen(cmd, shell=True, executable="bash") def start_graph(graph_manager: 'GraphManager', task_parameters: 'TaskParameters'): diff --git a/rl_coach/tests/test_eks.py b/rl_coach/tests/test_eks.py index 2a4d9f2..699afc6 100644 --- a/rl_coach/tests/test_eks.py +++ b/rl_coach/tests/test_eks.py @@ -42,7 +42,7 @@ class EKSHandler(): container = client.V1Container( name=self.test_name, image=self.image, - command=['/bin/bash', '-c'], + command=['bash', '-c'], args=[self.test_command], image_pull_policy='Always', working_dir=self.working_dir, diff --git a/rl_coach/utils.py b/rl_coach/utils.py index 0a57444..f51b02b 100644 --- a/rl_coach/utils.py +++ b/rl_coach/utils.py @@ -139,7 +139,7 @@ def ClassToDict(x): def cmd_line_run(result, run_cmd, id=-1): - p = Popen(run_cmd, shell=True, executable="/bin/bash") + p = Popen(run_cmd, shell=True, executable="bash") while result[0] is None or result[0] == [None]: if id in killed_processes: p.kill()