From de10e51770b7f5adcbd6c86d172e213e4027ede1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuke=20=F0=9F=8C=84?= Date: Tue, 24 Jun 2025 14:57:26 -0600 Subject: [PATCH] `docker pull` `stderr` and `stdout` exposed partial fix for #2338 --- crates/cuda/src/lib.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/crates/cuda/src/lib.rs b/crates/cuda/src/lib.rs index cf5a40dc9..a048ad633 100644 --- a/crates/cuda/src/lib.rs +++ b/crates/cuda/src/lib.rs @@ -216,10 +216,16 @@ impl SP1CudaProver { } // Pull the docker image if it's not present - if let Err(e) = Command::new("docker").args(["pull", &image_name]).output() { - return Err(format!("Failed to pull Docker image: {}. Please check your internet connection and Docker permissions.", e).into()); + let status = Command::new("docker") + .args(&["pull", &image_name]) + .status() + .map_err(|e| format!("Failed to pull Docker image: {}. Please check your internet connection and Docker permissions.", e))?; + + if !status.success() { + return Err(format!("`docker pull` exited with: {}", status).into()); } + // Start the docker container let rust_log_level = std::env::var("RUST_LOG").unwrap_or_else(|_| "none".to_string()); Command::new("docker")