From 28dc2b19b219760d509c17beca4744b8d337d613 Mon Sep 17 00:00:00 2001 From: Adam Dyess Date: Mon, 30 Oct 2023 13:01:50 -0500 Subject: [PATCH] read cuda driver deb in 1M chunk --- reactive/docker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reactive/docker.py b/reactive/docker.py index 4e6fcbe..ac57e34 100644 --- a/reactive/docker.py +++ b/reactive/docker.py @@ -428,7 +428,8 @@ def install_cuda_drivers_repo(architecture, release, ubuntu): with contextlib.closing(urlopen(repository_url)) as r: with open(cuda_repository_package, "wb") as f: - f.write(r.read()) + while chunk := r.read(1024 * 1024): # 1M chunks + f.write(chunk) command = "dpkg -i {}".format(cuda_repository_package) check_call(split(command))