Skip to content

Commit

Permalink
Use /bin/bash instead of /bin/sh to fix running in ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
oaksharks committed May 17, 2022
1 parent 3440cf0 commit 7ce66be
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tsbenchmark/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def make_run_requirements_conda_yaml_command(self, working_dir_path, player):

def get_command_prefix(self):
runpy_script = (HERE / "runpy.sh").absolute().as_posix()
return f"/bin/sh -x {runpy_script}"
return f"/bin/bash -x {runpy_script}"

def get_exec_py_args(self, working_dir_path, player):
player_exec_file = player.abs_exec_file_path().as_posix()
Expand Down Expand Up @@ -349,7 +349,7 @@ def make_run_requirements_conda_yaml_command(self, working_dir_path, player):
return command

def get_command_prefix(self):
return f"/bin/sh -x resources/runpy.sh"
return f"/bin/bash -x resources/runpy.sh"

def get_exec_py_args(self, working_dir_path, player):
remote_player_exec_file = (working_dir_path / "resources" / player.name / player.exec_file).as_posix()
Expand Down
2 changes: 1 addition & 1 deletion tsbenchmark/runpy.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

# unset https_proxy
# unset http_proxy
Expand Down
2 changes: 1 addition & 1 deletion tsbenchmark/tests/test_runpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def test_conda_yaml_env():
print(f"generated env file path: {conda_env_yaml_file}")

py_path = PWD / "runpy" / "conda_yaml" / "validate.py"
command = f"/bin/sh -x {runpy_file_path} --conda-home={conda_home} --venv-kind={PythonEnv.KIND_CONDA}" \
command = f"/bin/bash -x {runpy_file_path} --conda-home={conda_home} --venv-kind={PythonEnv.KIND_CONDA}" \
f" --requirements-kind={PythonEnv.REQUIREMENTS_CONDA_YAML} " \
f" --venv-name={env_name} --requirements-yaml-file={conda_env_yaml_file}" \
f" --python-script={py_path.as_posix()}"
Expand Down

0 comments on commit 7ce66be

Please sign in to comment.