diff --git a/benchmark/benchmark.py b/benchmark/benchmark.py index 509958030..bdec5630e 100755 --- a/benchmark/benchmark.py +++ b/benchmark/benchmark.py @@ -86,6 +86,8 @@ def main( summarize_results(dirname) return + check_docker() + if clean and dirname.exists(): print("Cleaning up and replacing", dirname) dir_files = set(fn.name for fn in dirname.glob("*")) @@ -432,5 +434,19 @@ def cleanup_test_output(output): return res +def check_docker(): + command = [ + "docker", + "run", + "-it", + "--rm", + "--interactive=false", + "python:3.8-slim", + "/bin/true", + ] + result = subprocess.run(command, stdout=subprocess.PIPE, text=True) + assert not result.returncode, "Can't run: " + " ".join(command) + + if __name__ == "__main__": app()